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

Contribute to debug start experience #4837

Closed
isidorn opened this issue Jan 13, 2020 · 12 comments
Closed

Contribute to debug start experience #4837

isidorn opened this issue Jan 13, 2020 · 12 comments
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.

Comments

@isidorn
Copy link

isidorn commented Jan 13, 2020

Hi VS Code dev here 👋

Last milestone we have introduced a Start View for debugging. More about this can be found here microsoft/vscode#84677
So when the user has no launch.json file this view should help him start debugging.

This view is currently language agnostic and not very cluttered thus we are slowly looking in opening it up to extensions. We have two options:

  1. Allow extensions to contribute commands / text to the current view. Those commands would be rendered as additional blue buttons or as some menu
  2. Allow extensions to contribute a whole view which would be below the start view. The C++ extension could choose what to render in that view and it would give a bit more control to the extension. Using context keys this view would only be visible in the "start" experience

What I would be interested in is what C++ would like to contribute to improve the start experience. If it is only commands, than I think it makes sense to show those commands in the start view (for example with additional blue buttons). If it is much more then it makes more sense that C++ contributes the whole view.
What are the biggest pain points that C++ users hit when setting up debugging?

Related python discussion: microsoft/vscode-python-debugger#164

Let me know what you think and how you envision the C++ debug start experience.
Thanks!

Current look of debug start view
fyi @WardenGnaw

Screenshot 2020-01-13 at 11 27 54

@Ulysiss

This comment has been minimized.

@pieandcakes
Copy link
Contributor

Biggest issues I see are:

  • Finding the correct debugger for their scenario on Windows
  • Compiling (aka how to compile, syntax, etc)
  • Configuring debugging for their specialized scenario such as remote ARM debugging, or some one-off setting.

@pieandcakes pieandcakes added debugger Feature Request investigate: repro This issue's repro steps needs to be investigated/confirmed labels Jan 13, 2020
@isidorn
Copy link
Author

isidorn commented Jan 14, 2020

Great, thanks for providing those.
And how could we potenitaly help users solve those issues? Is a button like "Set debugger" good enough for the first one, or would you require something much more elaborate? Any ideas?

@pieandcakes
Copy link
Contributor

I reviewed your github issue and PR and it looks like your goal is to provide "one button" or some simple way to get running/debugging. I think having a Set Debugger would be good.

Is the goal to have this for simple single file projects? Is the goal here for more complex projects to start from a state where compilation is done already? If so, the user would also need an option to select an executable.

@isidorn
Copy link
Author

isidorn commented Jan 14, 2020

The goal of this view is currently to be shown when the user has no launch.json - so it intended for beginner users who have issues with seting up debugging.

As for the selecting an executable, could that be done as part of the C++ start action. You could ask the user via quick pick and depending on the answer fill in the launch.json on the fly?

@pieandcakes
Copy link
Contributor

As for the selecting an executable, could that be done as part of the C++ start action. You could ask the user via quick pick and depending on the answer fill in the launch.json on the fly?

We have been tossing that idea around.

@WardenGnaw
Copy link
Member

For this scenario, do we want Run and Debug to do the same as Build and Debug Active File?

We already show this dropdown for that:
image

If users do not know how to customize launch.json they probably just want F5 to automatically build and debug a simple app (e.g. a Hello World program) which is similar to the Build and Debug Active File

@isidorn
Copy link
Author

isidorn commented Jan 15, 2020

@WardenGnaw agree that users would want F5 to just work. Which is automatically build and debug.
So the best experience would be if the C++ is creating a launch configuraiton on the fly that it also fils in the preLaunchTaks so the active file gets built. is that doable? Or would you need a special command for this? If you want a seperate button than we would need to contribut another button which imho is not the ideal experience.

@WardenGnaw
Copy link
Member

@isidorn I was testing out the debug start experience window, but my message does not appear if I provide a when clause for c or cpp.

E.g.

"viewsWelcome": [
      {
        "view": "debug",
        "contents": "Sample Start Debug Message",
        "when": "debugStartLanguage == cpp || debugStartLanguage == c"
      }
    ],

This is my active view
image

@isidorn
Copy link
Author

isidorn commented May 15, 2020

@WardenGnaw what you are doing looks good.
My best bet would be that your debugger is not specifiying that it is interested in .cpp files.
Here's an example how python is doing it https://github.com/microsoft/vscode-python/blob/master/package.json#L1189

@WardenGnaw
Copy link
Member

That was exactly the issue!

@isidorn As always, thank you for helping out. :)

@WardenGnaw WardenGnaw removed Feature Request investigate: repro This issue's repro steps needs to be investigated/confirmed labels Jun 15, 2020
@WardenGnaw
Copy link
Member

Resolved in #5503

@WardenGnaw WardenGnaw added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.
Projects
None yet
Development

No branches or pull requests

4 participants