debugging

How to make pdb recognize that the source has changed between runs?

独自空忆成欢 提交于 2020-01-02 01:09:30
问题 From what I can tell, pdb does not recognize when the source code has changed between "runs". That is, if I'm debugging, notice a bug, fix that bug, and rerun the program in pdb (i.e. without exiting pdb), pdb will not recompile the code. I'll still be debugging the old version of the code, even if pdb lists the new source code. So, does pdb not update the compiled code as the source changes? If not, is there a way to make it do so? I'd like to be able to stay in a single pdb session in order

Can a Java application detect that a debugger is attached?

余生长醉 提交于 2020-01-02 01:00:09
问题 I know about the (jvm) startup options to have the jvm wait until a debugger is attached - this is not what I mean here. Is it possible from within Java code to also detect attachment of a debugger, so that I could e.g. write a "script" that is doing some stuff and then at a certain point make my app wait for the debugger? 回答1: No. The options are JVM options, and no Javacode is executed before the debugger connects. You can however let the app start, and spinloop on a getter for a variable,

View Complete WCF response on error using Visual Studio 2010

☆樱花仙子☆ 提交于 2020-01-02 00:56:12
问题 In Visual Studio 2010 I get an error which tells me the first 1024 bytes of a response from a WCF service when consumed, but no more. I would really like to see the entire response so I can work out what is going wrong, where can I get this info from? Is there a way of logging the full text of an error or are they all limited by the 1024 byte rule? How to View more than 1024 bytes of a wcf response when an error occurs in Visual Studio 2010? 回答1: If you are doing this in debugging mode, where

System.Diagnostics.Debugger.Break() like using java?

我是研究僧i 提交于 2020-01-01 23:16:31
问题 Is there a method to signal a breakpoint in Java like System.Diagnostics.Debugger.Break() in C#? 回答1: yes I wanted something like this, so I implemented a pretty simple solution from my C days. This may be useful if you want a lightweight answer. public class DebugHelper { public static breakHere() { int i = 0; // Set breakpoint on this line in your IDE } } To use this method. Put a breakpoint in your code on the "int i = 0;" line. And call that method in the code you are debugging. It is a

System.Diagnostics.Debugger.Break() like using java?

自古美人都是妖i 提交于 2020-01-01 23:14:49
问题 Is there a method to signal a breakpoint in Java like System.Diagnostics.Debugger.Break() in C#? 回答1: yes I wanted something like this, so I implemented a pretty simple solution from my C days. This may be useful if you want a lightweight answer. public class DebugHelper { public static breakHere() { int i = 0; // Set breakpoint on this line in your IDE } } To use this method. Put a breakpoint in your code on the "int i = 0;" line. And call that method in the code you are debugging. It is a

How to search and sort BST by name(string)? Printing by queue and indented?

五迷三道 提交于 2020-01-01 19:58:08
问题 I have to write a program that reads a .txt file into the tree and then it allows to perform specific operations with it. I'm stuck on the part where I need to sort tree by names and search by name as well, any input would be awesome. So, my input file is in the format : 3800 Lee, Victor; 2.8 3000 Brown, Joanne; 4.0 So, my binary tree is in the format of: typedef struct { int id; char name[MAX_NAME_LEN]; float gpa; } STUDENT; typedef struct node { STUDENT* dataPtr; struct node* left; struct

Breakpoints and step by step debug in Java?

99封情书 提交于 2020-01-01 18:50:34
问题 Sorry for the strange name of my question. I don't know how to look for this because I don't know how these things are called. There's a features in Visual Studio at least where you can click on the left of the code and set a starting point which is a big red dot. Then you run the program and you can trace the steps by pressing f8 or f5 (different f's really) and you see the variable values on each step etc. I find it extremely useful because I can see where an error occurs and how the

Result discrepancy between cv.MinAreaRect2 and ArcGIS (GIS software) . Possible bug?

有些话、适合烂在心里 提交于 2020-01-01 17:25:21
问题 I have a set of points derived from a polygon. I am testing several solution in order to obtain the minimum area or the rectangle. As benchmark I am using ArcGIS (10.1). points = [(560036.4495758876, 6362071.890493258), (560036.4495758876, 6362070.890493258), (560036.9495758876, 6362070.890493258), (560036.9495758876, 6362070.390493258), (560037.4495758876, 6362070.390493258), (560037.4495758876, 6362064.890493258), (560036.4495758876, 6362064.890493258), (560036.4495758876, 6362063.390493258

Linux kernel hardware break points

跟風遠走 提交于 2020-01-01 17:12:32
问题 I want to build a simple linux kernel debugger for the x86 architecture. I first want it to set break points. I was wondering if there is a kernel api for configuring the debugger registers and if so any good documentation? If there is no kernel api for debugger registers is there any documentation on how to properly configure the registers manually(using the assembly "MOV" instruction)? 回答1: It depends on which kernel versions you would like to handle. There is an API for setting hardware

Intellij Idea hangs when debugging protractor

百般思念 提交于 2020-01-01 17:04:52
问题 I have problem similar to one mentioned in this question. I'm trying to debug protractor tests in IntelliJ Idea. After I set configuration for Node.js and press Run all tests run properly, but after clicking Debug , I see only: "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" --debug-brk=65500 --nolazy --debug node_modules\protractor\lib\cli.js protractor.conf.js debugger listening on port 65500 [launcher] Running 2 instances of