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

How do I connect to a running C or C++ process / one that requires input? #177

Open
stmonty opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@stmonty
Copy link

stmonty commented Dec 2, 2024

Hey, I have been enjoying use Dape, but I am not really an expert in debugging and the debugger adapter protocol.
One thing I have been having a hard time figuring out is how do I connect to a currently running C or C++ process?
Is this documented anywhere?

And in particular, how do you get a process to work that requires values from STDIN or some sort of input?

For example, imagine a REPL for a simple language that you could start with ./mylang repl and then type input into.

With gdb you could do something like gdb ./mylang and then gdb run repl and it will allow you to write things in the repl.

However, I am not expecting that level of functionality, but presumably if you could attach to an already running repl process, that should work?

I tried to add the :request "attach" and :pid <mylang's pid> to the minibuffer prompt after starting Dape, and then tried writing something in the repl to see if that would do anything, but it didn't seem to.

Maybe I am just fundamentally misunderstanding how this works. Any help would be appreciated!
(Also I am debugging with debug symbols).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant