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

syntax error is not highlighted nor is the line identified when in debug #20381

Closed
mjbvz opened this issue Dec 1, 2017 · 2 comments
Closed
Assignees
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Dec 1, 2017

From @johngrabner on December 1, 2017 0:51

  • VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:32:36.023Z)
  • OS Version: Windows_NT x64 10.0.14393
  • Extensions: none

Steps to Reproduce:

  1. create code with this error
let transaction = {
        type: "record change",
        record_id: this.id,

        new_value: new_value,
        new_magic_code = makeid(),

        old_value = this.current_value,
        old_magic_code = this.current_magic_code,

        old_state = this.state,
        new_state = this.master?"confirmed" : "pending"
    }
  1. run dubuger
    exception will only show the line doing the require

Exception has occurred: SyntaxError
SyntaxError: Invalid shorthand property initializer
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (c:\Users\John\Documents\GitHub\jjg_distributed_db\test\test_1_entity.js:6:16)

  1. So must leave Visual Code Studio and run node directly to see the line at fault

Copied from original issue: microsoft/vscode#39392

@mjbvz
Copy link
Contributor Author

mjbvz commented Dec 1, 2017

I confirmed that we do not get back any semantic of syntax errors in this case unless you enable checkJs. Not sure if this is by-design so as not to interfere with transpiled js code

@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2017

Tracked by #6107

@mhegazy mhegazy added the Duplicate An existing issue was already created label Dec 1, 2017
@mhegazy mhegazy closed this as completed Dec 1, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants