debugging

How to break on localStorage changes

≡放荡痞女 提交于 2020-06-12 02:53:50
问题 I'm looking for a way to break on any localStorage changes. I have found that there are some mysterious entries that I have no idea where that is coming from and I would like the debugger to break on any changes so that I can inspect the code. This includes: localStorage.someKey = someValue; localStorage["someKey"] = someValue; localStorage.setItem("someKey", someValue); Since there are so many ways to alter/create an entry in localStorage, simply overriding .setItem and do debugger; will not

How to build GDB on Windows

我们两清 提交于 2020-06-10 17:00:48
问题 How does one build GDB (the GNU Debugger) from source on Windows? I need to build it in order to make a build with Python support. I cannot use the one distributed with Cygwin because it has problems interpreting backslashes on Windows. What toolchains do I need for the build -- GnuWin32, MinGW, etc.? Can someone please provide step-by-step instructions on how to do this? 回答1: install (https://sourceforge.net/downloads/mingw) and configure MinGW with packages g++ gcc libc6-dev libtool pkg

Visual Studio Code - Python debugging - Step into the code of external functions when executing

岁酱吖の 提交于 2020-06-10 07:43:27
问题 In a Python project, how do you tell the built-in VSCode debugger to step into the code of functions from other libraries on execution? I know it is possible for functions implemented in standard libraries by adding a "debugOptions": ["DebugStdLib"] to your configuration in launch.json as specified here, however it does not seem to be possible to force the debugger to step into the code of non-standard modules, such as the ones you have written yourself and imported into the current file. 回答1

Breakpoint right before page refresh?

懵懂的女人 提交于 2020-06-10 07:38:05
问题 I'm debugging some 3rd-party minified Javascript that somewhere is triggering a browser page refresh. However, I can't figure out what part of the code is causing the refresh. Is there a way to put a breakpoint in Chrome that will be hit just before a page refresh so I can inspect the call stack to see what caused it? 回答1: Try this: Open your Chrome Dev Tools Navigate to the "Sources" tab On the right panel, expand "Event Listener Breakpoints" Expand the "Load" tree Check the beforeunload and

How do I send an email for every error that occurs in Node.js?

耗尽温柔 提交于 2020-06-10 04:08:28
问题 Let's say my node.js app is running. If there is an error (I mean ALL errors. Not just the web error. If it goes to Err out, it counts) , how can I call a function to send an email to me? Basically, before I want it to write to err.out, I want an email sent to me. I'm using node.js and express. Edit: I know how to send an email. The question I want to know is how to intercept the error . You know how when there's an error, it logs to out.log ? Well, right now, I'm tail -f out.log, monitoring

Why Single Stepping Instruction on X86?

两盒软妹~` 提交于 2020-06-07 21:50:13
问题 So there is "int 3" which is an interrupt instruction used for breakpoints in debuggers. But then there is also "int 1" which is used for single stepping. But why is this needed? I've read that setting the Trap Flag (TF) in EFLAGS register will enable single stepping and will trap into the OS for each instruction. So why is a separate interrupt type needed? Thanks! 回答1: int 3 is a special 1-byte interrupt. Invoking it will break into the debugger if one is present, otherwise the application

Suppress “Expected '===' and instead saw '=='.” error in jslint

懵懂的女人 提交于 2020-06-07 13:38:05
问题 How can I stop the error message Expected '===' and instead saw '=='. from appearing in jslint. Doesn't seem to be an option. 回答1: For those using JSHint, you can turn off this warning by setting the option eqeqeq to false in your JSHint options (usually .jshintrc ) "eqeqeq": false From the documentation: http://jshint.com/docs/options/#eqeqeq Edit: If you want to be a good citizen and fix your code to use the recommended comparison instead of turning the warning off, make sure both sides of

How to step into dependency code using Visual Studio Code?

跟風遠走 提交于 2020-05-30 16:12:32
问题 When debugging my user code, I want to step into the code of a dependency that is installed e.g. with pip install -e path/to/package . I tried to find a place within the project where dependencies are listed and can be browsed to open the source file to debug (e.g. this is possible in PyCharm via the "External Libraries" section). I would like to step into and through dependency code, but cannot find a way to do so. 回答1: It should be possible with the built-in debugging configuration. As far

How to step into dependency code using Visual Studio Code?

◇◆丶佛笑我妖孽 提交于 2020-05-30 16:10:46
问题 When debugging my user code, I want to step into the code of a dependency that is installed e.g. with pip install -e path/to/package . I tried to find a place within the project where dependencies are listed and can be browsed to open the source file to debug (e.g. this is possible in PyCharm via the "External Libraries" section). I would like to step into and through dependency code, but cannot find a way to do so. 回答1: It should be possible with the built-in debugging configuration. As far

Cannot attach to Silverlight app from VS

Deadly 提交于 2020-05-30 10:48:20
问题 In the past to connect to silverlight apps form Visual Studio I would go to Debug -> Attach To Process and then scroll down to where the type was Silverlight and attach to that. Recently, silverlight types do not seem to show up in the attach to dialog. What I have tried Project Properties -> Web -> Debuggers and ensure Silverlight is ticked Attaching to the same window as the silverlight is in What I want to happen To attach to silverlight apps from Visual Studio What is happening