Skip to content

[Docs]: C/C++ debug not working #5764

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

Closed
1 of 4 tasks
sakthivel-axim opened this issue Nov 8, 2022 · 12 comments
Closed
1 of 4 tasks

[Docs]: C/C++ debug not working #5764

sakthivel-axim opened this issue Nov 8, 2022 · 12 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@sakthivel-axim
Copy link

sakthivel-axim commented Nov 8, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Ubuntu 18.04
  • Remote OS: Debian
  • Remote Architecture: BeagleBone (armhf)
  • code-server --version: 4.8.1

Steps to Reproduce

  1. Download and install using dpkg -i <package.deb>
  2. Add launch.json with type cppdbg
  3. Able to compile and execute. But debug not working.

Expected

Able to debug

Actual

Throws error Configured debug type 'cppdbg' is not supported.

Logs

No response

Screenshot/Video

image

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Installed the .deb package in BeagleBone board. Running over HTTP.

@sakthivel-axim sakthivel-axim added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Nov 8, 2022
@sakthivel-axim sakthivel-axim changed the title [Bug]: C/C++ debug not working [Docs]: C/C++ debug not working Nov 8, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 8, 2022

I think the CPP debugger is in the MSFT extension which we can't use in code-server (based off this) so I don't think there's anything we can do here sadly.

cc @code-asher are there any workarounds that you know of?

@sakthivel-axim
Copy link
Author

Thanks, @jsjoeio. Understand that cannot use cppdbg. Please let me know the possibilities to use gdb for debugging in Debian environment.

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 10, 2022

Understand that cannot use cppdbg. Please let me know the possibilities to use gdb for debugging in Debian environment

None that I know of but maybe @code-asher knows

@code-asher
Copy link
Member

The only open-source version of the Microsoft C++ extension I know of is https://open-vsx.org/extension/llvm-vs-code-extensions/vscode-clangd but I have never used it so I am not sure how/if debugging works.

@a279437145
Copy link

I can have cpp debugging working on code-server running on my Raspberry pi (Ubuntu 22.04 , arm64) , I installed https://github.com/Microsoft/vscode-cpptools (there are armhf builds), you may try it . (It can work even without https)

@sakthivel-axim
Copy link
Author

Thanks you @a279437145 .

I have tried to install but it doesn't show in extension. Could you please share config/steps to bring up? It will be helpful.

@a279437145
Copy link

a279437145 commented Nov 23, 2022

yep , it's not in the openVSX extension gallery , so you cant install it directly.
I downloaded the vsix from https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
and chose the Download extensionoption in the right , then choose the right one for you
you are on armhf ubuntu , so you should choose Linux arm32 , like this:
IMG_20221123_171335

then put it on your code-server and install, the way to install exis extensions are described in the code-server docs

Also if you want i can provide my tasks.jsonandlaunch.json

@sakthivel-axim
Copy link
Author

Thanks @a279437145 . I will try to setup. Please share your tasks.json and launch.json, it helps a lot. Thanks once again.

@a279437145
Copy link

the files are here
launch.txt
tasks.txt
change the attribute to .json(I can't upload json files to github directly),and please ignore the python configuration in launch.json
it should work like this
Screenshot_2022-11-23-19-58-51-30_3aea4af51f236e4932235fdada7d1643
I cant use computer now so I did that on phone , the screenshot may somehow look a bit strange,regret~

@sakthivel-axim
Copy link
Author

It's working. Thank you @a279437145.

@a279437145
Copy link

a279437145 commented Nov 23, 2022 via email

@sakthivel-axim
Copy link
Author

yep , it's not in the openVSX extension gallery , so you cant install it directly. I downloaded the vsix from https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools and chose the Download extensionoption in the right , then choose the right one for you you are on armhf ubuntu , so you should choose Linux arm32 , like this: IMG_20221123_171335

then put it on your code-server and install, the way to install exis extensions are described in the code-server docs

Also if you want i can provide my tasks.jsonandlaunch.json

Debugging is working with help of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants