Nodeclipse / nodeclipse

Nodeclipse-1 : Eclipse plugin for Node.js, PhantomJS development (Nodeclipse core plugin); Maven and Gradle (with Android) plugins
https://nodeclipse.github.io/
158 stars 78 forks source link

Debugging removes project directory (when manually using wrong debugging configuration type "V8 Debugger for node") #104

Open mattispasch opened 10 years ago

mattispasch commented 10 years ago

Hello,

if i have a project in eclipse, lets say "my-server" and I create a debugging configuration with the "V8 Debugger for node" named "my-server", running the debugger deletes my project directory.

I think this bug actually is really critical as I lost some hours work because of it.

Thanks, Mattis

Nodeclipse: 0.8.0 Eclipse 4.3.0 (Juno)

paulvi commented 10 years ago

Hi Mattis,

with Nodeclipse, users usually don't need to create debugging configuration, just do Run As -> / Debug As ->

If you do it manually, you should use "Node Application" type of debugging configuration (not "V8 Debugger for node" )

Thank you for raising issue, a warning should be shared.

paulvi commented 10 years ago

I can't reproduce.

Could you tell me more detailed how did you create debugging configuration.

mattispasch commented 10 years ago

1) Create Project: File->New->Node Project , call it "my-server" 2) Create Debugging Config: Run->Debug Configuration Doubleclick "V8 Debugger for Node", use the same name as for the node project ("my-server") 3) Debug! 4) the project folder is removed from the filesystem

I think, in step 3, the debugger creates a new temporary project in Eclipse, where the sources loaded from the VM are saved. This temporary project does not appear in the file system and is removed from eclipse when debugging ends. (so there obviously must appear some kind of name collision)

By the way, I'm using Linux Mint 16, as "removing from file system" is done by the OS this might be important..

And thanks for the hint on debugging, I didn't read the tutorials, it just worked ;)

paulvi commented 10 years ago

I could reproduce on Windows, but only in case when debug configuration name is exactly as project name.

So final advices are:

@mattispasch Please read http://www.nodeclipse.org/ main page, it has a lot of picked information, hints and shortcuts. Though Nodeclipse project needs users inventing other way of usage, it should be after learning current standard, recommended way.

Redsandro commented 8 years ago

OOOOH my ffffffff....

I just lost hours of work with this exact issue in Eclipse Mars 4.5.0. In Linux btw, not in Windows. (Mint 17.2)

Any idea if this temporary directory is still anywhere to be found?

paulvi commented 8 years ago

@Redsandro Was your debug configuration name exactly as project name?

Redsandro commented 8 years ago

@paulvi Yes indeed. Not the same as the actual project directory, but the same as the project name.

The V8 Debugger for Node is more useful than Node Application because the former allows script mapping so that you can break (as in breakpoint) in your own source files. The latter breaks on chromium temporary files so you need to swap to a different editor to edit your code.

I don't know what step in this combination of open source projects is actually 'responsible', but I'd say this is pretty critical, most critical I've ever experienced myself. I even had the same two years ago, and then I thought I'd just remember not to use the same name. But it's human to forget.

This should not be possible.