EzDevInfo.com

debug interview questions

Top debug frequently asked interview questions

Where is the javascript console in Safari 5.0.5 for Windows?

Just what the title says. Where can I find the javascript console in safari?


Source: (StackOverflow)

ASCII-art unicorn one-liner [closed]

I need to spruce up my debugging messages. I have a smiley in there :D, but someone suggested using a unicorn. There are some nice resources on ASCII unicorns (e.g. http://www.ascii-art.de/ascii/uvw/unicorn.txt), but these are all too large to fit on one line. How should I go about writing in a small ASCII unicorn?


Source: (StackOverflow)

Advertisements

show all breakpoints when debug a python code with pdb

I am using pdb to debug a python code. I set the breakpoints in the pdb command line with b [linenumber]. Can I check all the linenumber of breakpoints? thanks.


Source: (StackOverflow)

How to debug a program as admin within Visual Studio

I'm running VS2K8 in Win7 64-bit. I'm logged in as admin and I'm running it as admin, but the program I'm working on fails with access denied when I call a restricted API. If run the program from Explorer with "Run as Administrator" it works.

I was under the belief that VS2K8 debugs programs with whatever rights VS2K8 itself is running with. As it stands I can't debug my application due to this and I'm at a loss as to what's going on.


Source: (StackOverflow)

How do I debug "X11 connection rejected because of wrong authentication"

I have a problem with X forwarding through SSH. I've battled for ages, but no-one can seem to help.

I'm now taking a different tact. I would like to know how I would debug the errors?

What logs should I look in, what extra flags should I set (-v etc) and what should I look for?

Further Edit:

If I log into Putty into the server and try to xeyes, I get:

PuTTY X11 proxy: wrong authorisation protocol attemptedError: Can't open display: localhost:10.0

If I xauth generate $DISPLAY I get:

PuTTY X11 proxy: wrong authorisation protocol attemptedxauth: (argv):1: unable to open display "localhost:10.0".


Source: (StackOverflow)

How to make Windows 10 BSOD show more details like older versions of Windows

I would like to know if there's any way to make Windows 10 show more details when crashing like windows 7 did.

And on this link to Microsoft developer net how to attach a debugger if it's possible under "Reading Bug Check Information from the Debugger".

And I have a BOSD issue right now if you can help with it it would be great link to problem that I asked at Microsoft
Requirements here and MS
We do need the actual log files (called a DMP files) as they contain the only record of the sequence of events leading up to the crash, what drivers were loaded, and what was responsible.

Answered own question From MS
Thanks for the help I just had to reinstall my windows UEFI method. It seems my firmware have buggy legacy support(BIOS), I think. When I'm using UEFI method to boot Ubuntu new version there are no kernal panics. Everything runs smoothly.

Thankyou


Source: (StackOverflow)

What's the easiest way to list all files opened by a program?

I'm debugging the initialization of a program (on a mac) and would I'd like to get a list of all the files opened during the execution, preferably in time order. Can this be done?


Source: (StackOverflow)

Windows 8 Consumer Preview - Full Core CPU Utilization by system process [closed]

I have a Lenovo X220 laptop on which I've installed Windows 8 Consumer Preview. Sometimes though it'll get stuck using 100% of a CPU core though in the SYSTEM process, and there's nothing I can do to view the stack here to narrow it down to a specific component, because the system process is "protected".

The strange thing here is that the issue seems to be intermittent. 99% of the time everything works fine, but sometimes it'll just start doing this. Rebooting fixes the issue.

Process Explorer (after getting debug symbols turned on) says the following:

Process Explorer Output

What steps might I take to troubleshoot this?


Source: (StackOverflow)

How do I remove these "autofocus" selection borders from the Windows 8.1/8 tile screen?

Good evening, everyone.

I've just recently started to notice some unintended-enabled borders around my Windows 8 machine. Here are some screenshots:

fig. a fig. b fig. c

In the above photos, you will notice that there are white and black borders around items. Unfortunately, I somehow enabled these (unintentionally), and wish to remove them. To clarify, I do not use keyboard navigation (arrow keys). It seems to be selecting the first item in most of the lists, as if it's ready for me to use the arrow keys to navigate. I have confirmed that in a new account I created, this issue does not occur, so it's obviously a problem with the end-user (myself).

If anyone has any suggestions on how to get rid of these obtrusive eyesores, please contribute.

To clarify further, these borders are these when the start menu is opened instantly. If I try to click somewhere else to remove the selection, while I hold the mouse down, the border is gone. However, when I release the mouse, it comes right back.


Source: (StackOverflow)

In GDB, how can I jump directly up to the topmost call stack frame?

I have a C program that seg faults after descending deep into an infinite recursive mess. Backtracing the process in GDB is useless because the call stack frame is at least 1000 frames deep, and the repeated function calls are series of four common recursive function calls (so breakpoints seem useless). Repeated calls to backtrace just reads out the four function names, over and over and over. It occurred to me that doing 'up' 'up' 'up'... would get me higher up, so I could see where this pattern first started occurring, but it seems that it would be more efficient to start from the topmost call stack frame and step down instead, because my hunch is that the infinite recursion starts early in the process. If the call stack had N frames total, I know I could just do

gdb>> up N

to get to the top of the stack (the Nth frame), but the problem is that I don't know N. Is there a command for finding the total number of frames in the call stack? Or, is there a slick built-in GDB command for jumping to the topmost frame? It occurred to me that the topmost frame should be the main() function - can I leverage that knowledge to get to the topmost frame?


Source: (StackOverflow)

Finding useful crash-information in Windows 8 Consumer Preview

I'm currently diving into C# and wanted to play around with the new Metro-styled-applications introduced with Windows 8, so I updated my Windows 7 to Windows 8 Consumer Preview.

The problem I'm facing right now is, that the system freezes after 3-5 minutes. It does not take any input from the keyboard or mouse and it does not recover (at least not in less then 10 minutes).

Since I have a background in Linux, I'd like to find some information about the cause of the freeze, but I have no idea where to search.

I checked the system-logs (under "System Control" -> "Management") but they only record that the system was shut down unexpectedly (doe to the face that I held down the power-button to reboot the PC). There is no useful crash-information in there.

I don't want to spend hours on randomly reinstalling drivers and doing things that "might help". Isn't there any place I can find some useful information about the freeze?

Before you ask:

  • I installed Windows 8 as an updated on my old Windows 7 installation (which worked fine by the way).
  • My hardware fits the minimum requirements (specs can be found here, the MacMini 3,1 model with 2GHz processor).
  • I have updated the graphics-card drivers to the newest Windows 8 drivers from nVidia.

Edit: I'm now using the final Windows 8 Pro on my machine and it had the same issues as the developer preview.

However, after deactivating the new "dynamic ticks" feature, the system is now stable and works like a charm. I didn't try it with the DP, so I don't know if this might be to fix for it, too.


Source: (StackOverflow)

Diagnosing slow Excel spreadsheets?

A client contacted me, complaining of Excel spreadsheets that were taking far too long to open. They use Excel for creating invoices, so they have hundreds of Excel spreadsheets with light formatting and very simple calculations. When sorting the spreadsheets by size, I saw that while most of the spreadsheets ranged from 10-250k, there were a handful of spreadsheets with filesizes of 2-3 MB and more. Oddly, the filesizes weren't huge, they aren't holding much data, just a bit of formatting, maybe two or three pages of printed invoices, but they amount of data was almost identical to the smaller sized (and normal opening) spreadsheets.

When opening the file, the amount of RAM needed would spike from 3 MB to 400 MB, and it would completely occupy a single core (tested on a dual-core in the office, and my quad-core laptop), while starting. I thought that they had somehow caught some VBA code, but there are no macros, no VBA code. Ctrl+End shows 39 rows and about 12 columns (ends at M). I've even deleted the data, row by row, or column by column, until there is no data left, and it still gives me the same problem.

I've reviewed plenty of Google searches, but I've gotten nowhere. Can anyone offer any help?


Source: (StackOverflow)

How to "debug" a keyboard in Linux? Like pressing a key and seeing a code in a terminal

I didn't have an answer to my problem about adding additional keyboards in my Ubuntu 10.04. Questions mark is not working in my keyboard, only using Alt Gr key + W.

So, I don't know if this is a problem with Ubuntu or Virtualbox itself (I'm running it inside a VM).

It's an usb keyboard. HP KU-0316.

I would like to debug this problem. The keyboard is plugged in, so when I press a key I believe something is being sent to my operating system, some code, I don't know. I would like to digg this problem, find some damn key code and find some damn *.conf file and manually fix my problem.

So, do an application like this exist in Linux?


Source: (StackOverflow)

How to see exception message in Google Chrome while paused?

I'm using Google Chrome for debugging JavaScript. I opened up the JavaScript Console and the "Pause on Exception" feature is enabled. Now whenever I run JavaScript that has an exception in it, it pauses on the line with the exception. However, I can't find where it says what the exception is. I have to press continue script execution for the exception message to be displayed in the JavaScript console.

With every other debugger I have used, whenever the debugger stops on a line, it tells you what was wrong with the line (i.e. the error message is shown). It seems odd that you have to press "run" before you see the error message.

Am I doing anything wrong or is this the only way to see the error messages?


Source: (StackOverflow)

Virtualized OSX can't see iPhone device

I've been running a VM with OSX for a while now while developing for iOS using an iPhone device. Everything was working fine until the update to El Capitan. Since the update, the iPhone is no longer being recognized by the VM-OSX (this includes iTunes, Xcode and AppCode).

The iOS device is definitely connected to the VM and not to the host computer, and I have clicked the "Trust this computer" in the popup which appears when plugging it into the usb for both the host and the VM.

Any idea what can be done about this other than going back to Yosemite?

Thanks in advance!

System configuration:

  • Host OS: Windows 10 Pro 64-bit.
  • VM OS: OS X El Capitan v10.11.
  • VMWare Workstation 11.1.2 (patched to support OSX).
  • iPhone 6, running iOS 9.0.2.
  • iTunes 12.3.0.44.
  • IDE1: Xcode 7.0.1 (7A1001).
  • IDE2: AppCode-OC (EAP) 142.5239.5.

UPDATE 1:

Following the example of this question, the device does appear in the hardware list: Devices list


UPDATE 2:

As discussed in this thread, a faulty AppleUSBEthernetHost.kext that was present on my system (v8.0.1) may have been the cause of the problem. I tried replacing it with an older version (7.0).

These are the steps I took:

  1. Booted into recovery to disable the System Integrity Protection (aka "SIP") by holding WinKey+R during VM boot (which is being mapped to Command+R by VMWare, according to this answer).
  2. When in recovery, I entered the terminal utility and disabled SIP using the command csrutil disable as described here, followed by a reboot.
  3. Replaced the kext with the old version, which was obtainable at the time of writing using the method detailed here (in short: download the latest iTunes dmg; open it with Pacifist; install the subpackage manual\MobileDevice.pkg) and rebooted (to ensure the right version was being loaded).

This action did not fix my problem.


Source: (StackOverflow)