Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open the debug without any stacktrace #403

Open
Mte90 opened this issue Jun 28, 2019 · 20 comments
Open

Open the debug without any stacktrace #403

Mte90 opened this issue Jun 28, 2019 · 20 comments

Comments

@Mte90
Copy link

Mte90 commented Jun 28, 2019

Screenshot_20190628_214225
I am trying with https://github.com/Varying-Vagrant-Vagrants/VVV to get running vDebug.
The issue is with this very basic settings:

let g:vdebug_options = {
    \    'break_on_open' : 0,
    \    'ide_key' : 'VVVDEBUG'
    \}
let g:vdebug_options.path_maps = {"/srv/www/": "/home/mte90/Desktop/VVV/www/"}

I see the page on loading and after a while open as show in the screenshot without any way to interact with the information.
It's not clear to me what is missing to get working everything.
If I use other tools the connection and debugging is working.

@Mte90
Copy link
Author

Mte90 commented Jul 2, 2019

any hint for help with the debugging?

@BlackIkeEagle
Copy link
Member

1st thing you can do to check if something is working is to enable break_on_open

@Mte90
Copy link
Author

Mte90 commented Jul 4, 2019

Removing break_on_open I get it working (I am on another computer):
immagine

but with wordpress is useless...

@BlackIkeEagle
Copy link
Member

I'm not sure what you mean with

but with wordpress is useless...

If I can guess, you mean nothing happens in wordpress, then that sounds normal, because you are blocking further execution?

@Mte90
Copy link
Author

Mte90 commented Jul 5, 2019

Sorry for the misunderstoonding.
I mean that break_on_open in wordpress is useless, so is better to disable it but in that way vdebug is not working for me.

@Mte90
Copy link
Author

Mte90 commented Jul 8, 2019

I saw the new commits, so I wanted to try the new changes but the result is similar.
immagine

@Mte90
Copy link
Author

Mte90 commented Jul 13, 2019

I am not sure that the latest changes to the plugin help with my issue, there are any kind of debugging that I can do to understand what is happening?

@BlackIkeEagle
Copy link
Member

The changes are unrelated to your issue. I'm going to look into it with time.

@Mte90
Copy link
Author

Mte90 commented Oct 6, 2019

Let me know how I can help, I am available to investigate in the code but I have no glue how works xDebug.
This issue is blocking me to use vim as daily tool and improve also my dev workflow.

@determin1st
Copy link
Contributor

With xDebug, you can use xdebug_break(); where you need to break on.

@Mte90
Copy link
Author

Mte90 commented Oct 6, 2019

Thanks for the hint, with that xDebug works as intended with vdebug!

If I try to put breakpoints in vim they are not reconized. At least I found a way to use it, thanks a lot!

@heylookltsme
Copy link

I'm having this same issue. Setting a break point with vdebug opens the the debugger with no output and then a message right away that says "waiting for a connection: none found so far". And if I try to use the step commands I get, "Step over is only possible when Vdebug is running."

Using xdebug_break() instead works as expected. 👍

Please let me know if I can provide more information that would be helpful.

@Mte90
Copy link
Author

Mte90 commented Aug 28, 2020

As I am trying to get a xdebug dev environemnt that works I am doing more tests, with pugdebug I am able to use breakpoints https://github.com/Mte90/pugdebug but with vdebug doesn't work, except when xdebug_break()is used.

So my guess is that vdebug is not sending or reading right some information that instead with that command are right.
Can someone help on debugging and giving some hints? I can try to patch vdebug on my own with more information, because this bug is stopping me to use vim at 100% since few years.

@Mte90
Copy link
Author

Mte90 commented Sep 14, 2020

I am having the same issue with https://github.com/puremourning/vimspector that use https://github.com/felixfbecker/vscode-php-debug

If I mark a breakpoint is not working but with xdebug_break() everything is fine.

@Mte90
Copy link
Author

Mte90 commented Sep 14, 2020

This is what I get in the vdebug log output when that issue happens:

- [Info] {Mon 14 2020 16:48:35} Closing the connection
- [Debug] {Mon 14 2020 16:48:35} Command: stop -i 1
- [Debug] {Mon 14 2020 16:48:35} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopped" reason="ok"></response>
- [Debug] {Mon 14 2020 16:48:35} Closing the socket
- [Debug] {Mon 14 2020 16:48:35} Closing the socket
- [Debug] {Mon 14 2020 16:48:35} keymapper: unmap
- [Debug] {Mon 14 2020 16:48:35} Closing the socket

Seems like that after launching the connection is stopped by vdebug itself before to get something from xdebug.

Xdebug log:

[6280] Log opened at 2020-09-14 14:48:31
[6280] I: Connecting to configured address/port: 192.168.50.1:9000.
[6280] I: Connected to client. :-)
[6280] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///srv/tideways-header.php" language="PHP" xdebug:language_version="7.1.33-16+ubuntu18.04.1+deb.sury.org+1" protocol_version="1.0" appid="6280" idekey="VVVDEBUG"><engine version="2.9.6"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[6280] <- stop -i 1
[6280] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopped" reason="ok"></response>

[6280] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopping" reason="ok"></response>

@BlackIkeEagle
Copy link
Member

@Mte90 is there a simple way to reproduce this? because I'm only seeing this empty stacktrace situation when xdebug got connected but there was no breakpoint hit.

@Mte90
Copy link
Author

Mte90 commented Sep 27, 2020

The point is that a breakpoint is configured inside vim but seems that vdebug is ignoring it

@BlackIkeEagle
Copy link
Member

Yes, I get the point, but I have not yet been able to reproduce it in any way. So I was wondering if you would be able to provide a simple enough example where it happens so that I can pinpoint what goes wrong.

@Mte90
Copy link
Author

Mte90 commented Sep 27, 2020

Well I am getting when using https://github.com/Varying-Vagrant-Vagrants/VVV/ with xdebug enabled, so I don't have any tiny environment to replicate...
That was the reasons I tried to investigate, if you can give me some hints in the code I can take a look again

@Mte90
Copy link
Author

Mte90 commented Dec 15, 2020

I did a bounty of 15$ for this ticket https://www.bountysource.com/issues/76208208-open-the-debug-without-any-stacktrace

I am available for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants