probe-rs / vscode

VSCode debug extension for probe-rs. It uses the MS DAP protocol to communicate directly with the probe (via probe-rs), and supports basic command line debugging in addition to VSCode UI.
https://probe.rs/
Other
65 stars 6 forks source link

Improve error message when debug adapter executable is not found #46

Closed Tiwalun closed 1 year ago

Tiwalun commented 1 year ago

New error message after this PR:

grafik

Before:

grafik

It also seems that the code which tries to check open ports doesn't really work, since it failed to detect that the server didn't start at all.

noppej commented 1 year ago

Nice ... thank you. I will have a look at this (also port issue) a little later today.

noppej commented 1 year ago

It also seems that the code which tries to check open ports doesn't really work, since it failed to detect that the server didn't start at all.

You are correct. For some reason, I can reproduce when the binary isn't there, the call to 'getPort()returns a different port number from the one requested, which 'should' indicate that the indicated port is now being used byprobe-rs-debugger`.

However, when probe-rs-debugger does launch, the getPort() request behaves as expected.

Since your fix prevents the misbehaving call to getPort(), it seems we can ignore it for now, or log an Issue for further investigation.

noppej commented 1 year ago

I am hoping we can figure out the release to marketplace sometime soon. Are you OK if we merge, but not release this fix for a few days?

Tiwalun commented 1 year ago

Sure, I don't need it urgently or anything.