Thanks for reaching out Based on your configuration, the error message you're facing ("Unable to find devcontainer.json") suggests that the debugger is looking for the devcontainer configuration file in the wrong path or context. Here are some steps you can take to address this issue:
Verify Path to devcontainer.json: Ensure that the path to the devcontainer.json file is correct inside the devcontainer. When you mount the project in the devcontainer, the file structure might differ from your local Windows setup.
- Switch CWD (Current Working Directory): Modify the
cwdproperty in yourlaunch.vs.jsonto ensure it corresponds to the working directory inside the devcontainer whereMyAppanddevcontainer.jsonreside. For example, if the structure is like/home/user/project/myapp, set it like so - Check Remote Machine Name: The
remoteMachineNameformat you're using is a bit unusual. Make sure it matches the expected format for SSH connections.
Environment Variables: Ensure any required environment variables that your app or the debugger expects are set in your devcontainer setup.
Deploy Instructions: Once you've set the correct path, consider adding back your deploy instructions in the configuration. This might help to ensure everything is properly synchronized when you initialize the debugging session.
- Installation of Required Tools: Make sure you have gdb installed in your devcontainer, as well as any other dependencies that your application or the debugging setup might require.