debugging

How would my program listen to OutputDebugString output and allow launch of multiple instances?

馋奶兔 提交于 2021-02-19 23:41:26
问题 Here's my scenario: I have a program which produces debug output with OutputDebugString() which maybe contains messages indicating bugs. I want to run this program inside daily build and automatically listen to debug output, parse it and report suspicious output. There're several examples of such listener implementations, for example this one. They all do the same - listen to a system-wide event and then read data from a file mapping. The problem is this protocol allows for only one instance

Scala tail recursive method has an divide and remainder error

旧街凉风 提交于 2021-02-19 07:47:28
问题 I'm currently computing the binomial coefficient of two natural numbers by write a tail recursion in Scala. But my code has something wrong with the dividing numbers, integer division by k like I did as that will give you a non-zero remainder and hence introduce rounding errors. So could anyone help me figure it out, how to fix it ? def binom(n: Int, k: Int): Int = { require(0 <= k && k <= n) def binomtail(n: Int, k: Int, ac: Int): Int = { if (n == k || k == 0) ac else binomtail(n - 1, k - 1,

Pycharm returns non-asciii error on running in django server in debug mode, works fine when I run in normal mode

大兔子大兔子 提交于 2021-02-19 06:34:09
问题 I have Django server running locally from quite some time. Suddenly today I started seeing error when runnign debug mode. it works fine in norrmal mode. I tried including utf-8 in manage.py but still I see error pydev debugger: process 10424 is connecting Connected to pydev debugger (build 192.6603.34) pydev debugger: process 10425 is connecting Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2066, in <module> main() File "

how to configure Vscode to debug Python using WSL?

让人想犯罪 __ 提交于 2021-02-19 06:26:40
问题 I found the configuration for cpp (https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows%20Subsystem%20for%20Linux.md) and tried to change it for python debugging but it doesn't work. Any suggestion to make it work? 回答1: It should be mentioned that the Python extension for VS Code does not officially support WSL yet, but the enhancement request has been made and we do plan on supporting it. 回答2: This is now supported and just requires installing the

Debugger how to only see values not memory addresses of variables

为君一笑 提交于 2021-02-19 06:01:30
问题 As of late I have been working extensively with struct and classes in visual studio.Most of them have a lot of values witch makes them hard to track in the watch windows while debugging because the watch windows and the floating watch windows ( the one you can pin , dont know precise term ) always show the memory address which obscures the view of the values. Is there a way to make it so that the watch windows only show the values and not memory addresses 回答1: Write the custom natvis would be

Debugging Firebase functions locally (node.js)

时光怂恿深爱的人放手 提交于 2021-02-19 05:34:20
问题 see below my code is very simple....it listens to a change on a database field in realtime-database. const functions = require("firebase-functions"); var admin = require("firebase-admin"); exports.onActiveUpdate = functions.database .ref("/profiles/users/{userId}/active") .onUpdate((change, context) => { //code here return true; }); Ive tried to debug code locally with the following commands firebase serve --only functions firebase serve firebase emulators:start I always get the same message.

How to debug a get request in php using curl

℡╲_俬逩灬. 提交于 2021-02-19 05:28:05
问题 I'm trying to make a get request in php using curl. This is what I'm doing: $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, "username:password"); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); printf($result); But $result doesn't print out anything, no success or failure message. I've successfully reached the endpoint via postman and in a web

How to debug a get request in php using curl

╄→尐↘猪︶ㄣ 提交于 2021-02-19 05:27:17
问题 I'm trying to make a get request in php using curl. This is what I'm doing: $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, "username:password"); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); printf($result); But $result doesn't print out anything, no success or failure message. I've successfully reached the endpoint via postman and in a web

How to debug a Spring Boot application in Spring Tool Suite

落爺英雄遲暮 提交于 2021-02-19 04:35:08
问题 I'd like to debug a simple Spring Boot application in Spring Tool Suite. It is a simple restful web service. I wanted to debug the controller and service class with embedded tomcat server. Found this post how to debug Spring MVC application on Spring Source Tool Suite. I followed the steps: Select Window-->Show View--> Servers . Right Click on server in the Servers panel, select " Debug ". Add breakpoints in your code Then right click on application, Select Debug As --> Debug on Server After

Post-mortem crash-dump debugging without having the exact version of a Windows DLL in the Symbol Server

試著忘記壹切 提交于 2021-02-19 02:41:48
问题 Within my application, I use the MiniDumpWriteDump function (see dbghelp.dll) to write a crash dump file whenever my application crashes. I also use a symbol server to store all my executables and pdb files, so that whenever a customer sends me a crash-dump file, the debugger automatically picks up the correct version of the executable and the debug information. I also store Windows DLL's (ntdll.dll, kernel32.dll, ...) and their debug information in the symbol server (using SymChk). The debug