lodash not available in Debug Console
See original GitHub issueIssue Type: Bug
I’m using the lodash library in my node.js application. When debugging I can’t use it in the Debug Console. I get the following error message:
srv/src/index.ts:146
_.find(['entityName', 'Subclaim Payment Item'])(allEntities)
Uncaught ReferenceError: _ is not defined
When I debug the app with Chrome Debugger this works.
Extension version: 2020.3.1117 VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:34:44.548Z) OS version: Darwin x64 18.7.0 Remote OS version: Linux x64 4.19.76-linuxkit Remote OS version: Linux x64 4.19.76-linuxkit
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-4870HQ CPU @ 2.50GHz (8 x 2500) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: enabled webgl2: enabled |
Load (avg) | 2, 2, 2 |
Memory (System) | 16.00GB (0.08GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Item | Value |
---|---|
Remote | Dev Container: Node.js 12 & TypeScript |
OS | Linux x64 4.19.76-linuxkit |
CPUs | Intel® Core™ i7-4870HQ CPU @ 2.50GHz (4 x 2492) |
Memory (System) | 1.94GB (0.25GB free) |
VM | 0% |
Item | Value |
---|---|
Remote | Dev Container: xxxxx: annotation |
OS | Linux x64 4.19.76-linuxkit |
CPUs | Intel® Core™ i7-4870HQ CPU @ 2.50GHz (4 x 2492) |
Memory (System) | 1.94GB (0.25GB free) |
VM | 0% |
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Imported functions are not in scope within Firefox debugging ...
I'm developing a project in React and I'm importing functions from lodash and Immutable.js.
Read more >Typescript Debug Console emits undefined errors : WEB-53343
I'm running into issues with the debug console where its reporting that local packages/functions are undefined even though stepping through the code clearly ......
Read more >How to import lodash to Chrome console? | by Matt Leo
From the lodash API page, look for sample, where you can find the link “TRY in REPL” at the lower bottom.
Read more >Lodash Get For Safer and Readable Code - Justin Noel
Trying to get the value of a property that may not exist in another property that may not exist: const starredByCalendee = repo...
Read more >console in JavaScript - GeeksforGeeks
Click() method not working and Console returns an error message in ... How to print debug messages in the Google Chrome JavaScript Console?...
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
using import * as _ from ‘lodash’; instead of import _ from ‘lodash’;
fixed the problem on Debug Console for me.
as @connor4312 said, for me
_
was renamed tolodash_1
(or if more accurate to:lodash_1.default
) during compilation. I found it inVSCODE
atLOADED SCRIPTS
section:also I found it at:
VARIABLES
->closure
sub section.