Giter Site home page Giter Site logo

ECONNREFUSED when debugging with VSCode extension and incorrect `runtimeArg` values in `launch.json`. Error message is not helpful. about probe-rs HOT 10 CLOSED

Dicklessgreat avatar Dicklessgreat commented on May 23, 2024
ECONNREFUSED when debugging with VSCode extension and incorrect `runtimeArg` values in `launch.json`. Error message is not helpful.

from probe-rs.

Comments (10)

Dicklessgreat avatar Dicklessgreat commented on May 23, 2024 1

IT WORKS!!!!!!!
image
1b works for me, and also, 1a is not mandatory, but works both with and without runtimeExecutable(but probe-rs-debugger did not work! only probe-rswork;)).
2also works.
3, sorry I don't fully understand what you intended to,(because I'm not sure even dap-server!!) but if you intend to check probe-rs works as dap-server, yes, it works.
無題

Thank you! So now my issue has finished, I close this issue but in case you think to improve error catching, feel free to reopen this issue and ask me to offer more context and information(if it's necessary)!

from probe-rs.

Yatekii avatar Yatekii commented on May 23, 2024

You need to install the newest version of the extension to work with the newest version of probe-rs :)

from probe-rs.

Dicklessgreat avatar Dicklessgreat commented on May 23, 2024

Hmm...I'm using probe-rs 0.19.0, and Debugger for probe-rs which is last released 6/29/2023, 22:53:36.
Seems newest?

from probe-rs.

Yatekii avatar Yatekii commented on May 23, 2024

You need the newest version of the extension not the debugger. The extension still tries to find the old binary name.

from probe-rs.

Dicklessgreat avatar Dicklessgreat commented on May 23, 2024

I mean...I'm using "Debugger for probe-rs" extension last released 6/29/23, 22:53:36. :)
I installed it yesterday from VSCode Marketplace...So I think it is the newest?
image

from probe-rs.

noppej avatar noppej commented on May 23, 2024

@Dicklessgreat From your description, it appears as if you are following the correct steps, so the devil might be in the details. Can you please do the following:

  • Post your launch.json
  • At the point where you get the dialog with the ECONNREFUSED error, can you please open another window and look to see if any probe-rs processes have been launched in the background?

from probe-rs.

Dicklessgreat avatar Dicklessgreat commented on May 23, 2024

@noppej Thanks reply!

I closed all windows that corresponds to development but the Pico debugging VSCode window, and hit F5, same dialog show up. At that moment, I run Get-Process on Power Shell and I couldn't find probe-rs processes.

  • launch.json

there're no changes from original template but "runtimeExecutable"

// The format of this file is specified in https://probe.rs/docs/tools/vscode/#start-a-debug-session-with-minimum-configuration
{
    "version": "0.2.0",
    "configurations": [
        {
            "preLaunchTask": "rust: cargo build",
            "type": "probe-rs-debug",
            "request": "launch",
            "name": "rp2040-project",
            "cwd": "${workspaceFolder}",
            "chip": "rp2040",
            // RP2040 doesn't support connectUnderReset
            "connectUnderReset": false,
            "speed": 4000,
            "runtimeExecutable": "probe-rs",
            "runtimeArgs": [
                "debug"
            ],
            "flashingConfig": {
                "flashingEnabled": true,
                "resetAfterFlashing": true,
                "haltAfterReset": true,
            },
            "coreConfigs": [
                {
                    "coreIndex": 0,
                    "programBinary": "target/thumbv6m-none-eabi/debug/rp2040-project-template",
                    "chip": "RP2040",
                    // Uncomment this if you've downloaded the SVD from
                    // https://github.com/raspberrypi/pico-sdk/raw/1.3.1/src/rp2040/hardware_regs/rp2040.svd
                    // and placed it in the .vscode directory
                    // "svdFile": "./.vscode/rp2040.svd",
                    "rttEnabled": true,
                    "options": {
                        "env": {
                            "DEFMT_LOG": "debug"
                        }
                    },
                }
            ],
            "consoleLogLevel": "Info", //Error, Warn, Info, Debug, Trace
            "wireProtocol": "Swd"
        }
    ]
}

from probe-rs.

noppej avatar noppej commented on May 23, 2024

Thanks. To me that implies that the process launch failed silently (ouch)

Before I try to reproduce with a deliberately bad process, can I ask you three more tests please:

  1. Run it without runtimeExecutable and runtimeArgs ...
    a. TheruntimeExecutable should only be required if you have a custom start script, or the executable is not in the default path.
    b. The runtimeArgs value you used is outdated. It should be dap-server ... please see the doc example or the `doc list of valid options
  2. Then, in runtimExecutable, please specify the fully qualified path and file name for the probe-rs executable.
  3. Finally, open a terminal window in probe-rs and try to run probe-rs dap-server --port 50223 from the command line.

My gut feel is that your problem is in 2b) above. If that is correct, then there is an "opportunity" to improve the probe-rs error catching :)

from probe-rs.

noppej avatar noppej commented on May 23, 2024

Re-opening to address the error handling for future users.

from probe-rs.

noppej avatar noppej commented on May 23, 2024

Closing as addressed in probe-rs/vscode#63 and #1699

from probe-rs.

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.