JS debug console gives errors on a couple common Array functions
See original GitHub issuesimple Array functions, executed in the JS debug console, appear to result in errors. (sample shown below)
[1,2,3].find(key => key > 2)
Uncaught SyntaxError: Invalid destructuring assignment target
[1,2,3].filter(key => key > 2)
Uncaught SyntaxError: Invalid destructuring assignment target
To Reproduce Steps to reproduce the behavior:
- run a JS file with a debugger statement
- when it stops on debugger statement, try to enter an Array function in the JS debug console
Log File
VS Code Version: Version: 1.64.1 Commit: d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03 Date: 2022-02-07T17:26:08.977Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Common JavaScript Errors and How to Debug Them
Learn how to debug common JavaScript errors, including SyntaxError, TypeError, and ReferenceError. Get practical code snippets and resources ...
Read more >A Definitive Guide to Handling Errors in JavaScript - Kinsta
Getting tripped up by errors in your JavaScript? We'll show you how to tame those errors so you can get back to developing...
Read more >The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >10. Debugging and Error Handling - JavaScript Cookbook ...
The first is a programming error, where we, the JavaScript developers, do something wrong. These types of errors are typically found using our...
Read more >Oops, I did it again: A guide to debugging common JavaScript ...
In order to debug these errors, you need to check your variables -- what are they? What is girl ? What is girl.named...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The next nightly build will have the fix, please let me know whether you run into this again!
Verification instructions:
Create a file minified.js
and also a file original.js
Debug minified.js, with a launch config or in the debug terminal.
Once there, play around the REPL. Verify you can evaluate
renamedVar
andanotherRenamedVar
as expected. For this particular issue, use the renamed name as a parameter, for instance[1, 2, 3].find(renamedVar => renamedVar === 2)