Comments (7)
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.
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.
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 inhello_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.
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.
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.
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.
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.
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.
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)
- Allow starting of `dap::net::Server` on other address than `localhost` HOT 2
- A closed Socket::Shared reads indefinitely HOT 4
- Include missing header in cpp/dap/io.h
- a tag or a release HOT 10
- Manjaro update fails cause cppdap is not found HOT 2
- possibly memory leak reported by valgrind HOT 1
- MSVC compiler warning with /W3 warning level
- Deserializer fails to deserialize Int64
- Allow network loop to run indefinitely HOT 2
- Project doesn't install anything HOT 6
- Update CMake version to 2.8.12 HOT 4
- Create DAP Server which listen a tcp port HOT 2
- Support for Server::start(host, port, callback, OnError)
- intermittent unreleased lock in `Socket::Socket`
- "body" field in "Terminated Event" is an optional field, but if no "body" will return {} in processEvent function. HOT 3
- Building DAP version 1.58.0 HOT 2
- Any client sample? HOT 1
- Add GitHub CI workflows? HOT 1
- How to specify implementation-specific arguments for `LaunchRequest`? HOT 2
- How to handle client socket close when using `dap::net::Server`? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppdap.