Questions tagged [debug-backtrace]

debug_backtrace() is a PHP function that prints the backtrace.

debug_backtrace() is a PHP function that prints the backtrace. A backtrace is a summary of how your program got where it is. It shows one line per call, for many calls, starting with the currently executing call (call zero), followed by its caller (call one), and on up the stack.

67 questions
0
votes
0 answers

Valgrind stack trace not proper in ARM machine

I am running valgrind on simple program on ARM machine(ubuntu) not getting proper stack trace in valgrind report, using latest valgrind (Valgrind-3.13.0) on machine. HEAP SUMMARY: in use at exit: 2,400 bytes in 6 blocks total heap usage: 7 allocs, 1…
0
votes
1 answer

Showing Swi-prolog backtrace?

I figure it may not be built to do that but I might ask. I want to run a simple cli application and have it show the backtrace in case of error. swipl -f test.pl -g test(X) This runs the goal test in the program. ERROR: -g test(X): Arguments are not…
0
votes
0 answers

Backtracking problem where the vector's value cant be produced inside main() when it is already been push_backed in a function defined above

Rat In The Maze The direction the rat needs to move #include #include using namespace std; bool isSafe(vector> &m, int i, int j, int n) { if (i < n && j < n && m[i][j] == 1) return true; return…
0
votes
0 answers

Get name of property with Reflection/StackTrace (or whatever)?

i.e. If you use this, it can trigger Object reference not set to an instance of an object: try { Dictionary ZZZ; ZZZ[1]= ..; } catch(Exception e) { var stackTrace = new StackTrace(e); var frames = stackTrace.GetFrames(); …
T.Todua
  • 53,146
  • 19
  • 236
  • 237
0
votes
2 answers

How to trace call to output buffer

So the scenario is that I have an application that uses output buffering, and the application is returning some extra data in addition to the expected results. I can manipulate the point where the expected results are being added to the output…
Anthony
  • 36,459
  • 25
  • 97
  • 163
0
votes
1 answer

debug_backtrace() trigger memory allowance issue

I am debugging a Joomla website. For learning purpose, I just want to see which file calls/requests a module's modulename.php file, so I put print_r(debug_backtrace()) in the top line of the modulename.php file, but an error triggered…
shenkwen
  • 3,536
  • 5
  • 45
  • 85
0
votes
1 answer

PHP var_dump of ALL functions?

I've had a SMTP process/function loaded in a global directory - has been working for years.. Today it suddenly stopped. I've been through my code & the smtp is being called by my subdomains. However Nothing is being recorded/logged. Im gtting no…
G Stewpot
  • 97
  • 1
  • 2
  • 10
0
votes
1 answer

PHP Warning: print_r and debug_backtrace when passing a mysqli connection

I have a very complicated system which was opening and closing MySQLi connections every time it wanted to perform a query - of which it was doing about 40,000 of per given operation (inefficient, I know). I decided to pass the mysqli connection…
Bing
  • 3,071
  • 6
  • 42
  • 81
0
votes
1 answer

How does gdb backtrace knows which library each function is taken from?

I've written a simple program that all it does is call a function called meller1, which calls to meller2, and so on until some function calls free and crashes. When running gdb backtrace on this program with the coredump file, I receive: gdb bt My…
Adiemus
  • 11
  • 2
0
votes
0 answers

PHP backtrace dumps infinite string

I am debugging an odd error in order to diagnose a simplistic PHP function that is not executing properly. The function itself is not the issue. When I ran a backtrace using debug_print_backtrace(), it just keeps printing and printing, endlessly. Is…
FurryWombat
  • 816
  • 2
  • 12
  • 28
0
votes
1 answer

How can I remove sensitive data from the debug_backtrace function?

I am using print_r(debug_backtrace(), true) to retrieve a string representation of the debug backtrace. This works fine, as print_r handles recursion. When I tried to recursively iterate through the debug_backtrace() return array before turning it…
aw crud
  • 8,791
  • 19
  • 71
  • 115
0
votes
1 answer

How do I get a PHP full call trace, not only stack call trace?

Is the following code PHP: The above…
ktretyak
  • 27,251
  • 11
  • 40
  • 63
0
votes
2 answers

Is there any `debug_backtrace()` function analogue to watch call stack in zf2 or is there any approach to debug call trace in zf2?

Introduction I am getting strange error in zf2. I don't know why, but I am getting some routing error. I don't get any messages, but needed controller is not loaded, but another one do. All looking fine, so it is not good idea to ask here to help me…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
0
votes
2 answers

Debugging PHP Code with debug_backtrace

I love to save time using someone else's code. And I want to start effectively debugging my scripts, as well as scripts I inherit from other developers. I've been reading up on debug_backtrace(), and I'm not sure if it's what I'm looking…
coffeemonitor
  • 12,780
  • 34
  • 99
  • 149
0
votes
1 answer

How to check who called the function in PHP?

It is any other method than debug_backtrace to check who called the function? I'm working on modular system and i like to control which module can have access to specific function/variable from the 'core' function set. debug_backtrace works perfect…
user2036944