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

Smartstep skips source code #68729

Closed
richardspence opened this issue Feb 14, 2019 · 1 comment
Closed

Smartstep skips source code #68729

richardspence opened this issue Feb 14, 2019 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@richardspence
Copy link

  • VSCode Version: 1.31.1
  • OS Version:MacOS Mojave

Smartstep ignores code that are generated from async/await using ts-node. The workaround is to disable smartStep in the launch.json

image

Repro files:
Launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Mocha Current File (ts-node)",
            "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
            "runtimeArgs": [
                "--preserve-symlinks",
                "-r",
                "ts-node/register",
            ],
            "args": [
                "--timeout",
                "999999",
                "--colors",
                "${file}"
            ],
            "runtimeExecutable": "~/.nvm/versions/node/v11.1.0/bin/node",
            "sourceMaps": true,
            "protocol": "auto",
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen",
            "env": {
                "TS_NODE_FILES": "true"
            },
            "smartStep": true,
        },
    ]
}

Test File

import { suite, test, } from 'mocha-typescript';
import * as sinon from 'sinon';
import { SinonSandbox } from 'sinon';
import { expect, assert } from 'chai';
import BluebirdPromise = require('bluebird');

@suite
export class PlayerControlApiDecSpec {

   
    @test
    public async test(){
        const answer = await BluebirdPromise.resolve(15);
        expect(answer).to.eql(15);
    }

}

tsconfig.json

{
    "compilerOptions": {
        "experimentalDecorators": true,
        "module": "commonjs",
        "target": "es5",
        
    }
}

Package.json

{
  "name": "scratch",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/bluebird-global": "^3.5.10",
    "@types/chai": "^4.1.7",
    "chai": "^4.2.0",
    "mocha": "^5.2.0",
    "mocha-typescript": "^1.1.17",
    "sinon": "^7.2.3",
    "ts-node": "^8.0.2",
    "typescript": "^3.3.3"
  },
  "dependencies": {
    "bluebird": "^3.5.3"
  }
}

Does this issue occur when all extensions are disabled?: Yes

@roblourens
Copy link
Member

Thanks for all the details, this is #68127 (comment)

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 14, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants