6 ms·
VS Code is, along with Typescript and Vue, one of my favorite things to have entered my world in the past 6 months. They have been rapidly improving VSC and I a
by mmanfrin 10y ago
VS Code is, along with Typescript and Vue, one of my favorite things to have entered my world in the past 6 months. They have been rapidly improving VSC and I am exceptionally happy with it.
- komali2 10y agoThe debugger changed how I code. So much better than any other node debug solutions.
- miguelrochefort 10y agoI'm confused. Did javascript people not use a debugger before VS Code?
- amadeusw 10y agoIt was console.log() all the way
- miguelrochefort 10y agoYou can't be serious.
- thenewwazoo 10y agoI'm not sure why not. AFAIK that's still your only option if you want to debug NodeJS code headlessly.
- miguelrochefort 10y agoWhat about conditional break points, call stack, time travel, watch list, live editing, etc?
- Ace17 10y agoWow, there are actually people using any of these?
- miguelrochefort 10y agoMore like all of these every day?
- laurencerowe 10y agoRunning 'node debug script.js' will drop you into the command line debugger. It's a little painful though as the command line debugger does not have support for moving up/down stack frames.
- AYBABTME 10y agoprintf-debugging is a fine way to debug a ton of cases, especially programs with concurrent components. The process of debugging step by step isn't necessarily superior or faster.
- wwalser 10y agoThe Chrome based dev tools have been an option for years using node-inspector. Had all of the basics that you would expect from a debugging. Breakpoints, step into/out/over, variables available at that location in the stack, REPL console etc.
- throw_away 10y agoIt was kind of a pain in my experience to use the Chrome debugger to be your main editor. I've not used VSC for this, but I imagine it's nice to not have to flip back and forth between tools.
- wwalser 10y agoI was responding to the claim that it console.log was the only way.
- ld00d 10y agoYou can debug in Chrome (or any other browser). For node, you can run node-inspector which uses a browser for debugging.
- maxxxxx 10y agoI am pretty to the javascript/node world. The debugging situation is pretty pathetic in my view. Most people I know use a ton of logging like we did with C/printf 25 years ago.
- wwalser 10y agoUsing awareness of how to use a debugger is a reasonable interview technique WRT javascript devs. In general, ignorance is not a pejorative but if a candidate walk into an interview claiming to be an expert and I find out that you debug in anger using console log, I'm calling bullshit. They're either very green or too lazy to have investigated the tools available. Jr devs are, obviously, another story. Read up on how to use node --inspect for newer versions of node or node-inspector for older versions. One common need that is a sad state of affairs in the Node world is performance tooling. It's available and competent professionals should invest in it once it becomes necessary but is a pain in the ass to setup and run.
- maxxxxx 10y agoAs usual in this industry there is a whole new generation of devs coming up that have forgotten stuff that has been standard for a long time. Then somebody implements this old stuff for the new tech and people think it's major innovation. I am sure soon somebody will create a node profiler.
- passive 10y agoSounds like a profitable model (introducing new devs to best practices).
- coldtea 10y ago>In general, ignorance is not a pejorative but if a candidate walk into an interview claiming to be an expert and I find out that you debug in anger using console log, I'm calling bullshit. Some of the best programmers advocate for printf over debuggers... And some of the crappiest programmers run around the debugger for hours with no idea what could be wrong in the program, stepping blindly here and there...
- wwalser 10y agoI don't know why there are so many non-answers or flat out incorrect answers to your question. Yes, js devs use debuggers and have for years. Firebug was created and popularized for browser js 10 years ago[1]. Node.js was released 7 years ago, got a debug option one year later using node debugger. It was CLI based and a bit shit. Tools which leveraged Node's debug protocol and Chrome's developer tools (node-inspector) for example were started 5 years ago[2]. Most recently some group associated (maybe on?) the Chrome team started creating a cleaner debug protocol and integrating directly with the Chromium project[3]. That's become the gold standard and is the standard way of debugging for Node 7+[4]. VSCode uses that protocol to offer debugging directly from the editor. 1. https://en.wikipedia.org/wiki/Firebug_(software) https://en.wikipedia.org/wiki/Firebug_(software) 2. https://github.com/node-inspector/node-inspector https://github.com/node-inspector/node-inspector 3. https://github.com/nodejs/node/pull/9028 https://github.com/nodejs/node/pull/9028 4. https://nodejs.org/api/debugger.html https://nodejs.org/api/debugger.html
- komali2 10y agoFor client code I'd use the chrome debugger constantly. I mean for debugging a node server. Maybe there was some way I didn't know about. There's the 'inspect' flag in node 6 now that prints out a link you can copy into your chrome browser to debug server node code.
- nobleach 10y agoSome of us used debuggers way WAY back in 2002. Venkman was the new hotness: https://en.wikipedia.org/wiki/Venkman https://en.wikipedia.org/wiki/Venkman Firebug quickly became the defacto later on. But telling your average web designer about breakpoints, stepping over and stepping into would cause their eyes to glaze over.
- kabes 10y agoHow is it better than the one in IntelliJ/webstorm?
- komali2 10y agoI don't know, I don't use intelliJ and I don't want to pay for webstorm. Somebody else probably knows. Anyway I like how low-memory-on-the-disk and low RAM usage VScode is, so I probably wouldn't enjoy intelliJ and webstorm for those reasons. I felt like even sublime was too bulky for me. Maybe they're good for other people and that's fine, but vscode just ticks all the right boxes.
- h1d 10y agoOut of curiosity, what is the reason, you don't want to pay? Is it your financial restriction or that there is something philosophical about sticking with free stuff whenever possible? Once you figure that if anything makes your days better by spending $10 or so a month, not choosing the best tool for the job sounds simply dumb. I have a friend who sticks with plain vim uncustomized because he doesn't want to deviate from the default in fear of not being able to seamlessly use other environment sounds utterly stupid wasting productivity for 99% of the time being on his own machine.
- komali2 10y agoI'm all about paying for things that add value - I haven't been convinced webstorm will add value. I am very fortunate in my means right now, but I come from a poor family, and spending money is emotionally trying for me. I gain pleasure from pushing my monthly expenses down as tight as I can. It seems melodramatic but paying for webstorm might just stress me out - I'd constantly feel a need to justify it, like when I tried subbing to World of Warcraft - I'd catch myself calculating fun per dollar. Euck. Anyway I'm a simple front end dev so I don't think it's necessary for now. As I branch out into Python perhaps Webstorm's tools will add tremendous value, I have seen some cool stuff but I just don't need it for now.
- kabes 10y ago
- takdi 10y agoHow is it better than the chrome one?
- komali2 10y agoI wasn't aware it was possible to debug a running node server in the chrome browser until the addition of the 'inspect' flag in node 6. Maybe it was possible, I'm not superleet or anything.
- jordache 10y agoIs vsc's debugger better than chrome devtools?
- netcraft 10y agoDo you use typescript with vue? I had researched it at one point, though admittedly not too far in depth, but came away with a conclusion that vue doesn't lend itself well to types.
- mmanfrin 10y agoNot yet -- I'm using TS for an unrelated project to my Vue projects; but I've read that support is on its way.
- vyrotek 10y agoIs there more work to be done besides the reference made in this announcement? > vue core, vue-router and vuex 2.0 all have TypeScript typings shipped in the npm packages https://medium.com/the-vue-point/vue-2-0-is-here-ef1f26acf4b8 https://medium.com/the-vue-point/vue-2-0-is-here-ef1f26acf4b...
- octref 10y agovue-class-component[0] seems to be adopted by vuejs org, and I'm planning to use it in my next project. [0]: https://github.com/vuejs/vue-class-component https://github.com/vuejs/vue-class-component EDIT: Just saw this on twitter: https://vuejs.org/v2/guide/typescript.html https://vuejs.org/v2/guide/typescript.html