Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: start to debug C++/python directly from command line. #72726

Closed
kgfly opened this issue Apr 22, 2019 · 6 comments
Closed

Feature request: start to debug C++/python directly from command line. #72726

kgfly opened this issue Apr 22, 2019 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *out-of-scope Posted issue is not in scope of VS Code

Comments

@kgfly
Copy link

kgfly commented Apr 22, 2019

This a feature request. Currently, for C++ to debug the exe or attach a process, for python, to debug a py script, 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

For cpp,
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."

For python:
code -e vspy -d ./a.py arg1 arg2, argN: to debug a.py with arg1 and arg2.... argN
"-e vspy" means "pass the following parameters to vscode-python 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.

@kgfly
Copy link
Author

kgfly commented Apr 22, 2019

There is a related one, #10979. However, it's about typescript. So I am not sure if mine is dup of that one.

@kgfly
Copy link
Author

kgfly commented Apr 22, 2019

microsoft/vscode-cpptools#3502 and microsoft/vscode-python#5396 are the related extension request.
I think it needs work from vscode and extension.

@weinand
Copy link
Contributor

weinand commented Apr 22, 2019

yes, this very similar to #10979.

In general this feature can be implemented as an extension (and at least one extension already exists). It is not on our roadmap.

@weinand weinand closed this as completed Apr 22, 2019
@weinand weinand added *out-of-scope Posted issue is not in scope of VS Code debug Debug viewlet, configurations, breakpoints, adapter issues labels Apr 22, 2019
@kgfly
Copy link
Author

kgfly commented Apr 23, 2019

cpptool guys from microsoft/vscode-cpptools#3502, said “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”
Just FYI

@weinand
Copy link
Contributor

weinand commented Apr 23, 2019

The extension https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-debug-launcher proves that this feature can be implemented without directly VS Code support.

@kgfly
Copy link
Author

kgfly commented Apr 25, 2019

Hi @weinand , cpptools folks said "For this feature, this would require implementing VS Code's UriHandler which should call startDebugging with the given parameters.". Please see it here microsoft/vscode-cpptools#3502 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

2 participants