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

Debugger Hangs #5

Closed
nbbeeken opened this issue Apr 11, 2020 · 4 comments
Closed

Debugger Hangs #5

nbbeeken opened this issue Apr 11, 2020 · 4 comments
Assignees
Labels
Investigation This issue should spawn new issues that are more concrete

Comments

@nbbeeken
Copy link
Owner

[Interpreter]

When you go to debug a mips file the debugger never gets the go ahead to start debugging from the interpreter. I suspect this has to do with the issues surrounding the code in
https://github.com/nbbeeken/dashmips/blob/master/dashmips/debuggerserver.py
With the asyncio python code, it is the same place where the interpreter fails to exit correctly since the event loop never gets shutdown. I went with the async code cus its cool, if you find it might be easier to just switch to the synchronous api go for it, async in python isn't as friendly as it is in Javascript.

[Debugger]

It could be that there's some more convenient APIs in the newer vscode debugger extension code. I'd take a look at their docs on what kinda actions they provide. I think its unlikely that it's vscode's fault but certainly RunInTerminal Request is something to explore

@nbbeeken nbbeeken added the Investigation This issue should spawn new issues that are more concrete label Apr 11, 2020
@tofarley
Copy link

tofarley commented Jul 31, 2020

I came to submit this issue. I experienced the problem across-the-board running Windows and using dashmips in both wsl and powershell from vscode 1.47.3 and dashmips 0.1.6 and 0.1.5 installed via pip. I was thinking there may be an issue relating to calling the interpreter on windows, or having multiple possible shells, so I tried it also on ubuntu the same vscode and dashmips installations.

I'm new to dashmips, so I'm not sure here, but the problem seems to extend beyond vscode? If I run python -m dashmips debug -i localhost -p 2390 -l ./hello.mips I can confirm that python is listening on 127.0.0.1:2390 but if I attempt to netcat to that port I get no response from dashmips when attempting to send any data/commands. This is all running on python 3.8.2

As an aside, dashmips -v still reports 0.1.0 regardless of which version I install from pip.

EDIT:
I do notice that when I run dashmips from the command-line I can send data via netcat and monitor the traffic with tcpdump, however when I click the launch button in vscode, I see no traffic on the loopback interface on the specified port.

@joshuamitchener
Copy link
Collaborator

As an aside, dashmips -v still reports 0.1.0 regardless of which version I install from pip.

Thanks for noticing this, I've fixed the -v command so it should produce the correct versioning now!

@nbbeeken
Copy link
Owner Author

nbbeeken commented Aug 1, 2020

I'm new to dashmips, so I'm not sure here, but the problem seems to extend beyond vscode? If I run python -m dashmips debug -i localhost -p 2390 -l ./hello.mips I can confirm that python is listening on 127.0.0.1:2390 but if I attempt to netcat to that port I get no response from dashmips when attempting to send any data/commands. This is all running on python 3.8.2

Thanks for helping out our project!
Unfortunately we seem to be blocked on these issues with vscode:
microsoft/vscode#100368
microsoft/vscode#103105
The error message is very nondescript so we're waiting on the solutions that fall out of here, and in the meantime exploring work arounds. I appreciate you taking the time to debug the networking, I'll explore that area for any issues.

@nbbeeken
Copy link
Owner Author

This has been resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigation This issue should spawn new issues that are more concrete
Projects
None yet
Development

No branches or pull requests

3 participants