microsoft / nodejstools

Node.js Tools for Visual Studio
http://aka.ms/explorentvs
Apache License 2.0
1.79k stars 359 forks source link

vs2019? #2125

Open Spongman opened 5 years ago

Spongman commented 5 years ago

is this broken in vs2019? i don't see the 'install new npm packages...' menu in the solution explorer any more.

robbie-mac commented 5 years ago

Just installed the Preview 2.0 and its there in the context menu.

amcasey commented 5 years ago

@Spongman It should still work in VS 2019. If you confirm that you've installed the Node Tools workflow and you're still not seeing the option, I'd suggest running Repair on your VS installation.

hendratommy commented 5 years ago

Hi,

I was playing around with this new VS 2019 to see if it fits me more than VS Code. But I just can't get it working as it should be.

  1. How to make editorconfig & tslint working? The .editorconfig and tslint.json is working fine in VS Code, but it is seems VS 2019 didn't pick up these settings. And how to make it auto format on save based on editorconfig and tslint?

  2. Debuging new TypeScript project using template is working fine, but how about existing project? I tried to create new project using From Existing Node.js code (typescript version), set an ts file as start up file, then i tried to launch debugging (F5), it always show error saying that Failed to launch debug adapter... Attribute 'program' does not exist... ...\project\src\app.js (shouldn't it pointed to app.ts instead?). Is there any additional configuration must be set up?

  3. I had plenty console.log logging, and some pino logging (using console) where i can see the logging output?

hendratommy commented 5 years ago

To answer my own question:

  1. It is seems the .editorconfig is picked up automatically by VS and the formatting must be triggered manually (format document). Luckily, there is an extension to trigger format on save. I still cannot get tslint.json working though.

  2. This because I set outDir in my tsconfig.json, the startup file must point to compiled js file, not the ts file, in my case it was dist\src\main.js. Still, i cannot get the hot reload working, any advice? My tsconfig.json is:

    {
    "compileOnSave": true,
    "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es6",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./"
    },
    "exclude": [ "node_modules", "./dist" ]
    }
  3. It's appear in node window!