angelozerr/angularjs-eclipse

Debug as > Error while launching client file

Closed this issue · 14 comments

Hi,

First thanks for you amazing work!!

In Eclipse the Run As > Protractor works fine !!!! Thanks for that!!

I have an issue regarding the Debug As > Protractor.

I have installed : http://oss.opensagres.fr/angularjs-eclipse/1.2.0-SNAPSHOT/
I have installed Webclipse JavaScript Debugger (http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=2456312)

regarding the section : https://github.com/angelozerr/angularjs-eclipse/wiki/Protractor#debug

1/ in the preference page of "Angular>Protractor", in the "Run/Debug protactor with" I have no "Webeclipse Javascript Debugger" in the list...
image

2/ In the preference page of "JavaScript>Tern>Server>Node.js" in the "Run in debug mode with:" the same, I have no choice ", no "Webeclipse Javascript Debugger" in the list...
image

=> Did I forget something during the install ?

Regards,
Arnaud

First thanks for you amazing work!!

Thanks!

Did I forget something during the install ?

No it was a mistake. You must install "Tern Debuggers". I have fixed the update site:

terndebuggersupdatesite

Please install "Tern Debuggers".

You must install "Tern Debuggers". I have fixed the update site:

Nice!

Please install "Tern Debuggers".

Done ;)

Now, I have one more Issue ("Selected Tern Repository is not imported as project in your workspace").
What I have done:

1/ In "Preferences > AngularJS > Protractor" I can now select the "Webclipse Javascript Debugger" Excellent!!
image

2/ In "Preferencies > JavaScript > Tern > Server Node.js"
image

  • I have checked "Run in debug mode with" and have selected "Webclipse Javascript Debugger".
  • "with Tern repository" I have no choice, so I have selected "default " (maybe not a good idea). When "default " is selected, I have the following Error : * "Selected Tern Repository is not imported as project in your workspace." *

Did I forget something ? Any Advices ?

Regards,
Arnaud

Tern debugger is used to debug any node application. Today we can debug:

  • Protractor with Debug As launch.
  • Tern plugins: when you do completion, hover, validation, etc inside JS Editor you can debug ternjs and tern plugins. So in your case you need not this feature (you wish to debug Protractor and not tern plugins). To debug tern plugins, you must import ternjs in your workspace (the goal of Import button is to import ternjs in your workspace) and after you can set a breakpoint in the ternjs plugins JavaScript editor.

In other words, in your case you need not to debug ternjs. As you have installed Webclipse tern debugger + Webclipse the "Debug As" Protractor should work.

First of all, thank you a lot for your fast response and your great support !!

In other words, in your case you need not to debug ternjs. As you have installed Webclipse tern debugger + Webclipse the "Debug As" Protractor should work.

When I run "Debug As > Protractor" I have the following error :
image

image

image
org.eclipse.core.expressions
Error
Thu Jan 21 11:35:56 CET 2016
No property tester contributes a property org.chromium.debug.core.isJsFile to type class org.eclipse.core.internal.resources.File

Have you ever faced a situation similar to the case described above?

My conf (General Properties) :
image

image

image

image

image

My conf (Project properties):
image

image

image

Installed Software:
image

It's an issue with Webclipse. @piotrtomiak have you an idea?

Perhaps the problem is that Webclipse is not started. Try to do a Run As to any JS file with Webclipse adn after retry Debug As Protractor

@angelozerr indeed

@Starsk44 can you see if normal Webclipse debugging with Node.js works? Just create a simple "test.js" file with one line console.log("test") and right click on it -> Debug As -> Standalone Node.js Application.

It might be an issue with installation, some conflict with nodeclipse features? Can you show me the list of installed plugins? Type org.chromium in the filter field and javascript.

@angelozerr Hmm... For me it keeps saying that it "Cannot find client file. Do you want to update Protractor preferences". I have imported everything as described in the doc. Maybe it has something to do with linux?

Update: There is a bug here, I'll create a PR to fix it

@angelozerr Ok, so the issue is fixed. What I've found regarding the issue reported by @Starsk44 is that you are reusing existing launch configuration without updating it's configuration. So if a user launches protractor for config.js with external tool, it will than launch always with external tool. And it is the external tool which fails to launch in debug mode. I have the opposite situation in my workspace, I've successfully launched Protractor with node and now I am unable to launch it with external tool.

Yo,

FYI : I have found a workaround :

Menu > Debug configurations ...
Create a new "Standalone Javascrip Application"

image

image

run this new debug conf ... and it works !!!!
image

@Starsk44 glad to hear that it works for you! I think that workaround is not enough though :) Let's keep it open until we get the Protractor launch issue figured out.

@angelozerr my proposition is to create a normal launch configuration, which would appear in the Debug/Run dialogs and could be edited over there. That launch config would spawn nodejs/nodeclipse/cli launches. Also, you need to "override" launch mode to "run" for cli "debug" launches, as the external tools launch delegate cannot handle "debug" mode.

I think that workaround is not enough though :) Let's keep it open until we get the Protractor launch issue figured out.

Ok Ok, let me know If I can help you here.

Thank you guys!! Thanks a lot for your amazing work and support.
Have a good day!

Cheers
Arnaud

@angelozerr I've create PRs to solve all the reported issues. As for the launch configuration persistence, proposed fix is temporary just to keep people working with existing code. Once we have a normal Protractor launch configs, we will be able to reuse launches. We are now in a very hot period as we work on MyEclipse release on Mars, but after that I will be able to help you/write the Protractor launch configuration.