-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fixes #1294: WebRoot folder can now be set when debugging a URL #1306
Conversation
…en debugging a URL
It seems to me that I am not responsible for the test failure, but that some mvn plugin is misconfigured. Is this correct? |
@Si-So At the moment - no. We've just released and WWD needs to bump versions for the next development cycle. |
It seems to me that it makes more sense to wait for the version bump performed by you... When will you bump the version? If it makes more sense to bump the version myself in this PR -> What file(s) do I need to touch? |
Give me few minutes, please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation is to be fixed. Please see the inline comment
...eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/AbstractRunHTMLDebugTab.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Si-So Please re-base your PR on top of master branch |
@Si-So I didn't understand why I managed to debug a react app even without this PR. Works even without filling |
IntroductionAfter looking into the behavior of the "Revert" button, I discovered more bugs. These bugs were not caused by me, but I will fix them anyway. Bug 1: Both radio buttons are selected at the same time
As stated above: This bug was not caused by this PR, but I will fix it anyway. Here is how to reproduce this bug in versions of wwd that don't have my changes:
This bug was caused by a missing statement in Bug 2: The debug dialog deletes user input when revertingSteps to reproduce:
Expected behavior: Pressing the "Revert" Button does not delete user input Bug 3: User input is deleted when re-opening the dialogSteps to reproduce:
Expected behavior: Closing and re-opening the debug configuration does not delete user input |
1. It is now impossible to select both radio buttons at the same time 2. The debug dialog no longer deletes user input when reverting 3. The debug dialog no longer deletes user input when re-opening See: eclipse-wildwebdeveloper#1306 (comment)
I merged with master, because I didn't want to force push. |
I am not sure why it worked with your react app. Maybe because react is a javaccript framework and angular is a typescript framework? I must admit that the working directory option in "Chrome Debug" confuses me. I looked into the source code of the debugger (https://github.com/microsoft/vscode-chrome-debug/blob/master/src/chromeDebugAdapter.ts) and as far as I understand the directory is passed to chrome as "cwd". I then wanted to know how chrome handles this option and looked at this list of the cmd-line options for chrome (https://peter.sh/experiments/chromium-command-line-switches/) and couldn't find the cwd-option. I then gave up to understand what this option does. Please note that the documentation for the debugger (https://github.com/microsoft/vscode-chrome-debug/tree/master) describes cwd as optional whereas the webRoot-option is mandatory when setting an URL. |
@vrubezhny: Regarding the failed test: I believe that my changes did not cause the regression. Maybe the test is flaky? Can you re-run the tests? However, if I am responsible, I will fix the test. Also: For some reason I could only close one of your requested changes. I feel like I have sufficiently addressed the issues that you raised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
@Si-So Thanks for the PR update. The failing test is not your fault - it fails sporadically for some reason. Thank you for the contribution. |
1. It is now impossible to select both radio buttons at the same time 2. The debug dialog no longer deletes user input when reverting 3. The debug dialog no longer deletes user input when re-opening See: #1306 (comment)
Thank you :) |
Design considerations
Since both the firefox debugger (https://github.com/firefox-devtools/vscode-firefox-debug#launch) and the chrome debugger (https://github.com/microsoft/vscode-chrome-debug#launch) use the webroot parameter, I added the functionality to
AbstractHTMLDebugDelegate.java
andAbstractRunHTMLDebugTab.java
. The webroot parameter was already set inFirefoxRunDABDebugDelegate.java
, but it was set to the project directory of the currently selected project in the workspace. Since I tend to have multiple projects in a workspace, the currently selected project is not always the correct project for a Chrome Debug session. Thus, it is better to give the user the option to explicitly set (and inspect) the webroot parameter.