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
. . . where <PATH_TO_PROJECT_FOLDER> is replaced with the path to your project folder.
Observe that the path to your project folder includes a parenthesis character.
Here's my launch.json:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "gcc build and debug active file", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/prog", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Skip path files", "text": "-interpreter-exec console \"skip -gfi /build/**/*\"" } ], "preLaunchTask": "make", "miDebuggerPath": "/usr/bin/gdb" } ] }
Here's my tasks.json:
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "make", "type": "shell", "command": "make" } ] }
For now, I work around this problem by dragging the project folder to a different director, but it would be great to have this problem get solved.
Thank you.
The text was updated successfully, but these errors were encountered:
Type: Debugger
The debugger can't debug a file whose folder path includes a parenthesis.
Find a folder that contains C code that you want to debug.
Put that folder inside another folder, and name the enclosing folder something that includes parentheses.
Open the folder that contains C code that you want to debug.
Configure the debugger.
Set a breakpoint.
Run the debugger.
In the terminal, you will get a message like the following:
$ env sh /tmp/Microsoft-MIEngine-Cmd-aceiyk8q.6a5 /tmp/Microsoft-MIEngine-Cmd-aceiyk8q.6a5: 1: /tmp/Microsoft-MIEngine-Cmd-aceiyk8q.6a5: Syntax error: "(" unexpected
If you open the file "/tmp/Microsoft-MIEngine-Cmd-aceiyk8q.6a5", you'll find:
echo $$ > /tmp/Microsoft-MIEngine-Pid-u4bxhtup.4nc ; cd <PATH_TO_PROJECT_FOLDER> ; DbgTerm=
tty; set -o monitor ; trap 'rm /tmp/Microsoft-MIEngine-In-chjq3lk8.lt0 /tmp/Microsoft-MIEngine-Out-8xgykbga.4mz /tmp/Microsoft-MIEngine-Pid-u4bxhtup.4nc /tmp/Microsoft-MIEngine-Cmd-aceiyk8q.6a5' EXIT ; /usr/bin/gdb --interpreter=mi --tty=$DbgTerm < /tmp/Microsoft-MIEngine-In-chjq3lk8.lt0 > /tmp/Microsoft-MIEngine-Out-8xgykbga.4mz & clear; pid=$! ; echo $pid > /tmp/Microsoft-MIEngine-Pid-u4bxhtup.4nc ; wait $pid;
. . . where <PATH_TO_PROJECT_FOLDER> is replaced with the path to your project folder.
Here's my launch.json:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "gcc build and debug active file", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/prog", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Skip path files", "text": "-interpreter-exec console \"skip -gfi /build/**/*\"" } ], "preLaunchTask": "make", "miDebuggerPath": "/usr/bin/gdb" } ] }
Here's my tasks.json:
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "make", "type": "shell", "command": "make" } ] }
For now, I work around this problem by dragging the project folder to a different director, but it would be great to have this problem get solved.
Thank you.
The text was updated successfully, but these errors were encountered: