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
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
I'm trying to do C code development using WebFreak001's gdb debugger extension. Regardless of whether and how preLaunchTask fails, Code always tries to launch the application. I tried pretty much every type of error and variations of arguments in the json files, and it always tried to launch my target app (gm).
This is on Ubuntu 14.04LTS. Originally I was doing make as the prelaunch task, and Code was launching even if the make had errors. The following code demonstrates the problem without using make.
{
"version": "0.1.0",
"command": "returnv",
"args": ["1"],
// The command is a shell script
"isShellCommand": false,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent"
//"problemMatcher": "$tsc"
}
It doesn't really matter if gm or returnv even exist (Code will still try to launch gm if returnv is not found), but anyway here is returnv.c . If it's compiled and Code finds it, I can tell that it's running properly from the printout in the Output window.
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("argc=%d argv[1]-'0'=%d\n", argc, *(argv[1])-'0');
exit(*(argv[1])-'0'); // exit with return code given in 1st arg
}
The text was updated successfully, but these errors were encountered:
isidorn
added
bug
Issue identified by VS Code Team member as probable bug
debug
Debug viewlet, configurations, breakpoints, adapter issues
labels
Mar 9, 2016
After writing the above issue, I downloaded VSCode v0.10.10. Now Code won't launch if the preLaunchTask returns an error (yay!), however if it can't find the preLaunchTask executable, it WILL still try to launch the target app.
@isidorn The main problem is fixed, so for example if there is a compile error during a make, Code won't try to run the target app. However, after further testing, I found that with other types of problems, e.g. preLaunchTask not found in tasks.json, or the executable (make, etc) not found, then Code still tries to launch the target app, which is probably not what we want.
In that case, Code displays a one-line error message "Error Could not find the preLaunchTask 'make'" but it's easy to miss that when the user's app runs. It can cause confusion because it may be an old version of the app, since it was not rebuilt with make.
So there is still a problem which could trip people up while getting the Code environment set up. Code should give a (perhaps more visible) error message and NOT launch the target app.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
I'm trying to do C code development using WebFreak001's gdb debugger extension. Regardless of whether and how preLaunchTask fails, Code always tries to launch the application. I tried pretty much every type of error and variations of arguments in the json files, and it always tried to launch my target app (gm).
This is on Ubuntu 14.04LTS. Originally I was doing make as the prelaunch task, and Code was launching even if the make had errors. The following code demonstrates the problem without using make.
Here is my launch.json:
Here is my tasks.json:
It doesn't really matter if gm or returnv even exist (Code will still try to launch gm if returnv is not found), but anyway here is returnv.c . If it's compiled and Code finds it, I can tell that it's running properly from the printout in the Output window.
The text was updated successfully, but these errors were encountered: