Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Extension/src/Debugger/nativeAttach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class PsProcessParser {
// Note that comm on Linux systems is truncated to 16 characters:
// https://bugzilla.redhat.com/show_bug.cgi?id=429565
// Since 'args' contains the full path to the executable, even if truncated, searching will work as desired.
public static get psLinuxCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; }
public static get psLinuxCommand(): string { return `ps axww -o pid= -o comm=${PsProcessParser.commColumnTitle} -o args=`; }
public static get psDarwinCommand(): string { return `ps axww -o pid=,comm=${PsProcessParser.commColumnTitle},args= -c`; }
public static get psToyboxCommand(): string { return `ps -A -o pid=,comm=${PsProcessParser.commColumnTitle},args=`; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ suite("Pick Process Tests", () => {
assert.equal(process2.pid, '15220');
});

test("Use portable ps options on Linux", () => {
assert.equal(
PsProcessParser.psLinuxCommand,
`ps axww -o pid= -o comm=${'a'.repeat(49)} -o args=`);
});

test('Parse valid CIM output', () => {
// output from the command used in CimAttachItemsProvider
const cimOutput: string = String.raw`[
Expand Down
Loading