You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I frequently debug a (specific) running process using VS Code on Windows, remote debugging an already running C++ process on Linux. I have a few related suggestions (and/or bugs) for launch.json, and the documentation of it:
In launch.json, I have "processId":"${command:pickProcess}", which works. However, I also have the "program" setting specified (which the documentation says is "required" -- see Cannot read property 'document' of null #3), but the list of running processes that are displayed is never filtered to only show that "program". So, this is my first suggestion: If a "program" is specified, filter the list to only that program (there may still be more than one). This could be done by starting the running program selection with the "program" text in the search box (related to Path must be a string. Received undefined #2). Or, it could be done without the search box by simply limiting the list to those processes which match. If the latter, perhaps skip displaying the list of just one item and/or have an option to do so.
In the running program selection box, I am frequently typing the same thing (actually, different than my "program", because I am searching for a command-line parameter). It would be nice if I could specify some default text search string in launch.json (that could override "program" if you also do Code completion with C/C++ extension #1). I would still want to be able to edit the text, but this text could appear as the default/initial text in the search box.
The documentation on https://code.visualstudio.com/docs/cpp/launch-json-reference lists "externalConsole" option. However, A) The editor shows a yellow squiggly for it, and B) See Attach not working #4592 where I found out that my debugger never actually attaches when that setting is present (after selecting the process to attach to). Please update the documentation and also make the debugger still work if an invalid entry is present in launch.json (or at least report it in the notifications).
I'd love these features too, I'm wondering if there is a way around by using custom launch commands in launch.json. Can you set processId to 0 and then on launch, run a custom script that selects the process id for you?
Type: Debugger
I frequently debug a (specific) running process using VS Code on Windows, remote debugging an already running C++ process on Linux. I have a few related suggestions (and/or bugs) for launch.json, and the documentation of it:
In launch.json, I have "processId":"${command:pickProcess}", which works. However, I also have the "program" setting specified (which the documentation says is "required" -- see Cannot read property 'document' of null #3), but the list of running processes that are displayed is never filtered to only show that "program". So, this is my first suggestion: If a "program" is specified, filter the list to only that program (there may still be more than one). This could be done by starting the running program selection with the "program" text in the search box (related to Path must be a string. Received undefined #2). Or, it could be done without the search box by simply limiting the list to those processes which match. If the latter, perhaps skip displaying the list of just one item and/or have an option to do so.
In the running program selection box, I am frequently typing the same thing (actually, different than my "program", because I am searching for a command-line parameter). It would be nice if I could specify some default text search string in launch.json (that could override "program" if you also do Code completion with C/C++ extension #1). I would still want to be able to edit the text, but this text could appear as the default/initial text in the search box.
The documentation on https://code.visualstudio.com/docs/cpp/launch-json-reference says that "program" is "required". However, it does not appear to actually be required (at least in my scenario it seems to be ignored).
The documentation on https://code.visualstudio.com/docs/cpp/launch-json-reference lists "externalConsole" option. However, A) The editor shows a yellow squiggly for it, and B) See Attach not working #4592 where I found out that my debugger never actually attaches when that setting is present (after selecting the process to attach to). Please update the documentation and also make the debugger still work if an invalid entry is present in launch.json (or at least report it in the notifications).
(I originally posted this at microsoft/vscode#86946, but they said to post it here).
The text was updated successfully, but these errors were encountered: