Skip to content
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

builtin: unable to successfully run mocha tests (debug) #7488

Closed
vince-fugnitto opened this issue Apr 2, 2020 · 8 comments · Fixed by #7695
Closed

builtin: unable to successfully run mocha tests (debug) #7488

vince-fugnitto opened this issue Apr 2, 2020 · 8 comments · Fixed by #7695
Labels
bug bugs found in the application builtins Issues related to VS Code builtin extensions debug issues that related to debug functionality vsx-registry Issues related to Open VSX Registry Integration

Comments

@vince-fugnitto
Copy link
Member

Description

I am unable to successfully run mocha tests in the application (debug).
It is possible that due to a typo, the wrong version (incompatible) was published in open-vsx, and means we cannot debug successfully.

Using the previous entries for node-debug (and node-debug2) works successfully:

"vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
"vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix",

Steps to Reproduce

  1. start the application using 'theia' as a workspace
  2. open a *.spec file (ex: 'logger.spec.ts')
  3. open the debug-view
  4. select 'run mocha test' as a debug configuration
  5. click on run
  6. notice that the test does not run, and nothing happens

Additional Information

  • Error Log (when clicking on 'run'):
Error: Cannot find module '/Users/vincentfugnitto/workspace/theia/plugins/vscode-builtin-node-debug/extension/dist/nodeDebug.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at [eval]:1:41
    at Script.runInThisContext (vm.js:96:20)
    at Object.runInThisContext (vm.js:303:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Object.<anonymous> ([eval]-wrapper:8:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
root ERROR [hosted-plugin: 34411] internal/modules/cjs/loader.js:586
    throw err;
    ^
@vince-fugnitto vince-fugnitto added bug bugs found in the application debug issues that related to debug functionality builtins Issues related to VS Code builtin extensions vsx-registry Issues related to Open VSX Registry Integration labels Apr 2, 2020
@vince-fugnitto
Copy link
Member Author

Opened an issue on VSX so we can track publishing the correct version of node-debug:

@akosyakov
Copy link
Member

@vince-fugnitto I don't see incompatibility issues from errors. Could you please check that again as with Java node extension is properly packaged by comparing with the same version from VS Code marketplace.

@vince-fugnitto
Copy link
Member Author

@vince-fugnitto I don't see incompatibility issues from errors. Could you please check that again as with Java node extension is properly packaged by comparing with the same version from VS Code marketplace.

Sure! I'll give it a try and report back my findings.

@vince-fugnitto
Copy link
Member Author

vince-fugnitto commented Apr 2, 2020

I was unable to get it working using the node-debug version directly from the vscode marketplace either (latest).

@akosyakov
Copy link
Member

ok, thanks for checking, we need to fix support support of latest node debug in Theia (do we need another issue for it?), for now we can make sure that the proper version is published to the registry

@vince-fugnitto
Copy link
Member Author

I tried with the updated version present in open-vsx and it still fails to work for me:

@vince-fugnitto
Copy link
Member Author

When using the updated vscode-node-debug extension, the following error still occurs when trying to debug. It looks like the dist folder is missing in our packaged extension:

Error: Cannot find module '/Users/vincentfugnitto/workspace/theia/plugins/vscode-builtin-node-debug/extension/dist/nodeDebug.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
root ERROR [hosted-plugin: 92007] internal/modules/cjs/loader.js:584
    throw err;
    ^

@vince-fugnitto
Copy link
Member Author

Opened another upstream issue: open-vsx/publish-extensions#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application builtins Issues related to VS Code builtin extensions debug issues that related to debug functionality vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants