Che: Debug>Start with no debug configurations gives no feedback to the user

Created on 24 Jul 2019  路  9Comments  路  Source: eclipse/che

Describe the bug

We have several devfiles (https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/angular, https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/dotnet) where there is no option to debug the project. When selecting Debug>Start debuggin (or F5) shortcut, nothing happens. As well as Debug>Start without debugging (Ctrl+F5).

Che version

  • [x] nightly

Steps to reproduce

  1. create workspace from devfile https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/angular
  2. run yarn install task
  3. open main.ts file
  4. click Debug>Start Debugging
  5. nothing happens

Expected behavior

current file should start and debug should work

Runtime

  • [x] minikube (include output of minikube version and kubectl version)

Screenshots

debug

Installation method

  • [x] chectl

Environment

  • [x] my computer

    • [x] Linux

Additional context

areeditoche-theia kinenhancement severitP2

Most helpful comment

Following PR merged in theia upstream: https://github.com/eclipse-theia/theia/pull/6870

All 9 comments

Is there a debug configuration that is present in your workspace? and is the application started in debug mode?

@slemeur There is not. TBH, I didn't know I have to add configuration first. I thought that clicking debug will run and debug current file. Take it as new user might see it.
I would suggest to either disable Debug option, when no configuration. Or maybe better open launch.json in the same way as if I click on Add configuration.
Q: is it possible to add debug configuration to devfile?

You are 100 in your approach, to take it as a new user.
I like your proposal of with the debug option when there is no configuration available. The user should be guided into creating at first. Could you create the enhancement issue for that? cc @tolusha .

As for the debug configuration in the devfile, I don't think it is right now, but something we should be looking at.

I think we should display a list of installed debuggers on the workspace and auto-generate a launch with the selected one and open the launch.json. It is very likely that auto-generation will not get the all details right but it will provide the starting point.

I like your proposal of with the debug option when there is no configuration available. The user should be guided into creating at first. Could you create the enhancement issue for that?

It is how VS Code behaves.

Currently, clicking "Start Debugging" without a config doesn't do nothing, it just creates a default debug config in the background without notifying the user. Clicking "Start Debugging" a second time opens the debug panel and starts the just-created config. This is a pretty unintuitive flow, even though it sometimes works without issue.

E.g. I just tested the golang devfile:

  • Check debug configs, nothing there
  • Click "Start Debugging", nothing happens
  • Open debug configs, new default entry is added
  • Click "Start Debugging", Debug sidebar is opened and debugging launches.

We should either merge steps the create + launch, or notify the user to create a debug config with a prefilled template.

@amisevsk Thank you for investigating and renaming the issue. Makes much more sense now.
I think that create + launch + notify that debug config was generated is the way to go. We should do the best to prepare workspace for debugging, but we can't do magic so it should be clear that the configuration was generated and user is supposed to customize it.

Removed status/info-needed as it looks like we have an agreement: generate and open a launch.json file. But not to launch it right away (the user needs to review it first). And if there is more than one DBA prompting the user which one to use.

Following PR merged in theia upstream: https://github.com/eclipse-theia/theia/pull/6870

Was this page helpful?
0 / 5 - 0 ratings