AlexRee / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error debugging node.js with closure library #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Google Chrome version:
SDK + Eclipse Debugger version(s): 0.2.2 on Eclipse 3.6
OS + version: Windows 7, 64-bit

What steps will reproduce the problem?
1. Create debug target for node.js with nclosure installed and 'required'
2. Start target

What is the expected result?
Debugger attaches to node.js process

What happens instead?

Caused by: org.eclipse.core.internal.resources.ResourceException: < is an 
invalid character in resource name '<eval #113>.chromium'.
    at org.eclipse.core.internal.resources.Resource.checkValidPath(Resource.java:432)
    at org.eclipse.core.internal.resources.File.create(File.java:116)
    at org.eclipse.core.internal.resources.File.create(File.java:196)
    at org.chromium.debug.core.util.ChromiumDebugPluginUtil$4.tryCreate(ChromiumDebugPluginUtil.java:245)
    ... 20 more

Please provide any additional information below. If possible, attach a
(reduced) test-case.

I've modified ChromiumDebugPluginUti.java to handle '<','>' in addition to '?' 
characters. Patch below:

Index: ChromiumDebugPluginUtil.java
===================================================================
--- ChromiumDebugPluginUtil.java    (revision 647)
+++ ChromiumDebugPluginUtil.java    (working copy)
@@ -231,7 +231,7 @@
    *         has failed
    */
   public static IFile createFile(final IProject project, String filename) {
-    String patchedName = new File(filename).getName().replace('?', '_'); // 
simple name
+    String patchedName = new File(filename).getName().replaceAll("\\?\\<\\>", 
"_"); // simple name

     UniqueKeyGenerator.Factory<IFile> factory =
         new UniqueKeyGenerator.Factory<IFile>() {

Original issue reported on code.google.com by wolfgang...@gmail.com on 8 Jun 2011 at 10:47

GoogleCodeExporter commented 9 years ago

Original comment by peter.ry...@gmail.com on 8 Jun 2011 at 11:32

GoogleCodeExporter commented 9 years ago
This is likely a Windows-specific problem.

Original comment by peter.ry...@gmail.com on 8 Jun 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Fixed in HEAD

Original comment by peter.ry...@gmail.com on 13 Jul 2011 at 11:42

GoogleCodeExporter commented 9 years ago
Fixed in 0.3.0

Original comment by peter.ry...@gmail.com on 19 Aug 2011 at 10:37