Reputation: 780
Using Visual Studio Code v 1.32.3 on Windows 10, when I navigate to Debug > Add Configuration, nothing happens. No errors or other messages, nothing appears to be written to the workspace folder, no errors in Event Viewer, so far just nothing.
I am somewhat new to VSCode so please don't discount that this might be a newbie error. Potentially notable is that the project is a Cordova project, I have created a Workspace (and confirmed that I am using it and not just opening the folder).
What I have checked so far:
Interestingly if I open a new instance of VS Code and before opening any file or folder I go back to Debug > Add Configuration I will get a message "Please first open a folder in order to do advanced debug configura..." So this indicates that there may be a problem with my workspace or directory but I haven't found it yet.
Any ideas greatly appreciated.
Edit 1:
Version of Cordova Tools is 1.8.0.
I've since tried adding my own launch.json to the .vscode directory. Contents:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run android on device|emulator",
"type": "cordova",
"request": "launch",
"platform": "android",
"target": "device|emulator",
"sourceMaps": true,
"cwd": "${workspaceFolder}"
},
]
}
Notable is that in the bottom right corner of the window a "Add Configuration" button appears while I am viewing launch.json and it does appear to work correctly, prompting me with snippets to add.
None of these impact my ability to debug unfortunately.
Upvotes: 13
Views: 31800
Reputation: 1
One silly mistake that may lead to this problem is and that I did was to debug when in a non executable file, so be sure to be in that file which is executable. In my case it was a .cpp file where I should've been but I was in one of the header file .h that I created while debugging.
Upvotes: 0
Reputation: 127
You should delete .vscode folder and run again debugger extension. This will generate a new .vscode folder with a launch.json file in.
Upvotes: -1
Reputation: 136
Did you install the latest version of VS Code? I had the same problem and I fixed it by updating to the latest version.
Upvotes: 0
Reputation: 812
Check VS Code OUTPUT window. When VS Code is downloading some launcher packages like .NET Core Launch, Debugging process may be affected. After downloading packages are completed check it again.
Upvotes: 1
Reputation: 827
For me when I press Add Configuration from the dropdown on the upper left it does nothing, I keep pressing up and down in and out of places and suddently it works... then it does not again...
However I found a blue button on the lower right of the screen that works more consistently, I'm uncertain if it is the same issue or that button doesn't work for you either but this was my own experience.
Upvotes: 2
Reputation: 780
Alright I think I have this working. Steps:
From here it looks like I'm back on track.
Upvotes: 9