debugging

How to change debugger settings for debugging individual unit tests from VS 2015 Test Explorer

岁酱吖の 提交于 2020-01-24 10:36:08
问题 Test Explorer allows to run tests under debugger and I use it quite often for debugging single tests. However debugger settings used in this case are different from that set for the test project and prevent efficient debugging. I would like to limit debugging to managed mode only for UWP class library while debugger starts always in mixed native/managed mode. This prevents any debugging as .NET Core does not support mixed mode debugging. I work on VS 2015. After checking and testing all

Get pid (process ID) of R session from within R session (to attach a debugger)

无人久伴 提交于 2020-01-24 10:17:05
问题 How can I find out the process ID of the current R session my R code is running in? I am using Ubuntu 18.04, but an answer working on Windows would also be great. 回答1: There is a command called Sys.getpid() that outputs the session ID directly Sys.getpid() #[1] 134164 来源: https://stackoverflow.com/questions/58657784/get-pid-process-id-of-r-session-from-within-r-session-to-attach-a-debugger

Why is GDB filling the 0s of a memory address with 5s during a register info?

喜夏-厌秋 提交于 2020-01-24 10:12:11
问题 I am using GDB on a x64 CPU. As you can see, I am trying to access the value of the rip register and for some reason the address of the instruction the register is pointing to is displayed using 5s instead of 0s as it should be. Dump of assembler code for function main: 0x0000000000001139 <+0>: push rbp 0x000000000000113a <+1>: mov rbp,rsp 0x000000000000113d <+4>: sub rsp,0x10 0x0000000000001141 <+8>: mov DWORD PTR [rbp-0x4],0x0 0x0000000000001148 <+15>: mov DWORD PTR [rbp-0x4],0x0

How to cause a debug break in firebug

佐手、 提交于 2020-01-24 10:00:28
问题 I am trying to make firebug break when an error is detected. Specifically, I have some internal checks in my code, like assertions, that I want firebug to stop on when they fail. I have tried a few different ways and wondered what other people do? Here are the ways I have tried: Put in some invalid code so that if errors out: function assert(value) { if(! value) dbgbreak(); } // Fails because dbgbreak not defined This works somewhat, but does not stop the code in such a way that I can see the

How to attach to a running Matlab script

本小妞迷上赌 提交于 2020-01-24 09:24:10
问题 How can I attach to a running Matlab script (i.e. a m-file which I have executed with F5 ) ? It runs since days (I have an infinite while loop) and I want to understand what is wrong (it should exit it at some point). I know I can rerun it and set a breakpoint but that is not what I am asking. I wanna set a breakpoint NOW inside the loop and stop the process and debug it. Matlab does not allow me to set a breakpoint. 回答1: Unfortunately Matlab does not allow this. To work around this problem I

Monodevelop: `Waiting for debugger`

南笙酒味 提交于 2020-01-24 08:54:07
问题 I am trying to debug this Mono desktop software in Monodevelop. I imported the SLN file, ran Build all with success, but when I press the Debug button I get this popup that stays waiting forever saying Waiting for debugger : The output says: User assembly '/home/nico/src/SparkleShare/SparkleShare/bin/SparkleShare.exe' is missing. Debugger will now debug all code, not just user code. My first line of code is a Console.WriteLine whose output does not appear anywhere. Am I doing something wrong?

Android Studio 2.1 does not show local variables when debugging

南楼画角 提交于 2020-01-24 08:37:25
问题 My AS stopped showing local variables. Currently I'm using AS 2.1, but tried AS 2.0 and AS 1.5.1. It started some time ago, I guess with the update to 2.0. I've moved to the older version but it did not help. I'm using build tools 23.0.3, and gradle 2.1.0. I've also added testCoverageEnabled false to build.gradle. There are very little info about that issue around the internet, one I've found: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status

Copying the objects while debugging

寵の児 提交于 2020-01-24 06:35:07
问题 While copying the variable values in debugging mode of eclipse , we have the option Copy Variables , which we can use to copy the values stored in that object but now I observed that when I paste those in notepad , variables named Long,Integer don't give you the values instead you will get some reference numbers with the datatype. For example : id Short (id=2435) What If I also want to get the detailed tree copy of the object , when I am debugging. 回答1: I found the answer , expand each and

How do I get DebuggerBrowsable RootHidden to work?

偶尔善良 提交于 2020-01-24 01:00:08
问题 I read about the DebuggerBrowsable attribute yesterday, and it sounded great, however when I tried to get it to work in a test, It doesn't seem to make any difference. I am using VS 2008 version 9.0.30729 1 SP, .Net 3.5 SP1, MSTest framework [TestClass] public class TestingDebuggerBrowsable { [TestMethod] public void JustToDemonstrateDebugging() { var foo = new MyExposedClass(); foo.ToString(); // I put a breakpoint here, and debugged the test } } public class MyExposedClass { public

Unfortunately MyApp has stopped. How can I solve this?

雨燕双飞 提交于 2020-01-24 00:37:11
问题 I am developing an application, and everytime I run it, I get the message: Unfortunately, MyApp has stopped. What can I do to solve this? About this question - obviously inspired by What is a stack trace, and how can I use it to debug my application errors?, there are lots of questions stating that their application has crashed, without any further detail. This question aims to instruct novice Android programmers on how to try and fix their problems themselves, or ask the right questions. 回答1