Open kgfly opened 5 years ago
This would be a feature for VS Code itself. There is no commandline option to pass to the extension at the moment. Please submit an issue at https://github.com/Microsoft/vscode/issues
I think it need works from both vscode and extensions. I filed one in vscode. https://github.com/Microsoft/vscode/issues/72726
@9527KGG I agree that there may be work on our extension side. However, we are blocked until VS Code has a way to communicate to the extension that it needs to launch/attach a process from the commandline.
Some one suggested a similar one but not for c++ though: https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher
@WardenGnaw , https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher mention that they can debug script by running "vscode://fabiospampinato.vscode-debug-launcher/\<command>?args=\<arg1>,\<arg2>,\<argN>". So can vscode-cpptools have similar feature? It does not require any work from vscode.
@9527KGG Thanks for letting us know.
For this feature, this would require implementing VS Code's UriHandler which should call startDebugging with the given parameters.
Hi @9527KGG, why you close this issue?
Hi @9527KGG, why you close this issue?
because I gave up :)
Hi @9527KGG, why you close this issue?
because I gave up :)
then please reopen this issue to mark it as unresolved (and hopefully someone may create a pr for it ˊ_>ˋ )
This feature is also useful to me. Any progress in the past two years?
I saw many similar feature requests were marked as duplication of https://github.com/microsoft/vscode/issues/10979, and 10979 was closed recently. But in 10979 I can't find anything useful to a task described in this issue.
Type: Debugger Input information below
This a feature request. Currently, to debug the exe or attach a process, I've to setup launch.json, which is very tedious if you just want to do some quick very verification.
Request: start to debug directly from command line, eg
code -e cpp -d ./a.out arg1 arg2, argN: to debug a.out with arg1 and arg2.... argN code -e cpp -p 12345: attach process 12345.
"-e cpp" means "pass the following parameters to vscode-cpptools extension."
As a comparison:
In visual studio, you can devenv.exe /debugexe a.exe
Eclipse has a plugin: https://github.com/eclipse-cdt/cdt/blob/master/debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh, which allow you to start debug from command line.
Emacs (which is close to VScode since both VScode and emacs are editors while VS/Eclipse are IDE, you can pass some parameters https://stackoverflow.com/questions/5997309/start-emacs-gdb-from-command-line to start debugging directly.