GithubHelp home page GithubHelp logo

Comments (7)

Elias-Johansson avatar Elias-Johansson commented on June 19, 2024 1

Hi Ben,

Everything works fine. Thanks for the quick response and fix!

--
Best,
Elias

Thank you for your patience. Lots was broken - my apologies.

I've created PR #13 that should fix your issues.

It's also worth mentioning you'll need to enable VSCode's Debug: Allow Breakpoints Everywhere option in order to be able to set the breakpoint in the synthetic file.

Please let me know how you get on.

from cppdap.

ben-clayton avatar ben-clayton commented on June 19, 2024

Hi @Elias-Johansson,

I'm sorry you're having difficulties running the example.
I just tried the example on Linux, which worked as expected.
I wrote the example on macOS, and I don't think I've changed anything since that was last tested.
Which leaves Windows...

Unfortunately I don't currently have a Windows machine to hand to test this on. I will have one next week, so I will try testing then.

Before then, do you get any useful information when enabling the LOG_TO_FILE macro in hello_debugger.cpp?

Many thanks,
Ben

from cppdap.

Elias-Johansson avatar Elias-Johansson commented on June 19, 2024

Hi @Elias-Johansson,

I'm sorry you're having difficulties running the example.
I just tried the example on Linux, which worked as expected.
I wrote the example on macOS, and I don't think I've changed anything since that was last tested.
Which leaves Windows...

Unfortunately I don't currently have a Windows machine to hand to test this on. I will have one next week, so I will try testing then.

Before then, do you get any useful information when enabling the LOG_TO_FILE macro in hello_debugger.cpp?

Many thanks,
Ben

I tried to enable the definition of the LOG_TO_FILE macro and specify the path to the existing file (#define LOG_TO_FILE "C:/Users/Elias/Documents/log.txt"). For some reason, it logs nothing.
--
Thanks Elias.

from cppdap.

Elias-Johansson avatar Elias-Johansson commented on June 19, 2024

Ben,

I manually changed "program": "hello_debugger" to "program": "hello_debugger.exe" in .vscode\extensions\google.cppdap-example-hello_debugger-1.0.0\package.json. Subsequently, I disabled and enabled google.cppdap-example-hello_debugger-1.0.0 again in VSCode extensions.
Now it logs the attached data.

log.txt

However, I cannot step over and toggle breakpoints. As far as I understand, hello_debugger generates the synthetic file source. Is it possible to interactively debug the synthetic file source as a usual file, which is opened in VSCode?

--
Thanks Elias.

from cppdap.

ben-clayton avatar ben-clayton commented on June 19, 2024

Hi Elias,

Yes, the executable extension is probably quite important. Good find. :)
I'll be sure to update the CMake template generation to add this suffix to the program name.

The log file suggests that the debugger hasn't responded to the initialize request, which is odd. However, this might just be a lack of file flushing. Is there any more content in the file if you close VSCode after attempting to use the sample debugger?

However, I cannot step over and toggle breakpoints. As far as I understand, hello_debugger generates the synthetic file source. Is it possible to interactively debug the synthetic file source as a usual file, which is opened in VSCode?

Yes, that is the intended behaviour of the example. When I make it back home, I'll try and reproduce on my Windows box.

Cheers,
Ben

from cppdap.

Elias-Johansson avatar Elias-Johansson commented on June 19, 2024

Hi Ben,

Yes, the executable extension is probably quite important. Good find. :)
I'll be sure to update the CMake template generation to add this suffix to the program name.

The log file suggests that the debugger hasn't responded to the initialize request, which is odd. However, this might just be a lack of file flushing. Is there any more content in the file if you close VSCode after attempting to use the sample debugger?

Yes, it adds the following:

"Content-Length: 79

{"command":"disconnect","arguments":{"restart":false},"type":"request","seq":2}"

I've attached the updated log file.

log_new.txt

However, I cannot step over and toggle breakpoints. As far as I understand, hello_debugger generates the synthetic file source. Is it possible to interactively debug the synthetic file source as a usual file, which is opened in VSCode?

Yes, that is the intended behaviour of the example. When I make it back home, I'll try and reproduce on my Windows box.

Thanks.

--
Best,
Elias

from cppdap.

ben-clayton avatar ben-clayton commented on June 19, 2024

Hi @Elias-Johansson,

Thank you for your patience. Lots was broken - my apologies.

I've created PR #13 that should fix your issues.

It's also worth mentioning you'll need to enable VSCode's Debug: Allow Breakpoints Everywhere option in order to be able to set the breakpoint in the synthetic file.

Please let me know how you get on.

Thanks,
Ben

from cppdap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.