zobo / dbgpPlugin

A DBGP debugger plugin for Notepd++
GNU General Public License v2.0
1 stars 0 forks source link

Xdebug connects but doesn't work #2

Open Scrolin opened 9 months ago

Scrolin commented 9 months ago

I've recently installed Xdebug and the Npp Dbgp plugin following the instructions. Calling xdebug_break or xdebug_info in the PHP CLI, the connection is established with the Npp IDE which immediately throws up a a message Unable to map remote: file//C:/PHP php shell code (ip: 127.0.0.1 idekey: local_setup) fallbeck to source The PHP CLI waits until the message is acknowledged, when it comes back with a command entry prompt (following the xdebug_info output), and the Npp IDE throws up an error message Element "Error" does not contain a single text node.

The same happens when xdebug_break is called from within a function in a script ( even the file name in the first message is unchanged), and script execution continues. All, breakpoints and watches are ignored.

Setting/unsetting the 'Use SOURCE command...' and/or the 'Break at first line...' options in the Dbgp config don't have any affect.

Is this a bug, or am I doing something wrong?

I've attached the xdebug log, and here is the Npp debug info

Notepad++ v8.5.8   (64-bit)
Build time : Oct 15 2023 - 21:43:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Home (64-bit)
OS Version : 22H2
OS Build : 19045.3693
Current ANSI codepage : 1252
Plugins : 
    dbgpPlugin (0.14.1)
    mimeTools (2.9)
    NppConverter (4.5)
    NppExport (0.4)
    NPPJSONViewer (1.40)
    XMLTools (3.1.1.13)

and here is the xdebug_info output

__   __   _      _
\ \ / /  | |    | |
 \ V / __| | ___| |__  _   _  __ _
  > < / _` |/ _ \ '_ \| | | |/ _` |
 / . \ (_| |  __/ |_) | |_| | (_| |
/_/ \_\__,_|\___|_.__/ \__,_|\__, |
                              __/ |
                             |___/

Version => 3.1.6
Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support

             Enabled Features (through 'xdebug.mode' setting)
Feature => Enabled/Disabled
Development Helpers => ✘ disabled
Coverage => ✘ disabled
GC Stats => ✘ disabled
Profiler => ✘ disabled
Step Debugger => ✔ enabled
Tracing => ✘ disabled

                            Optional Features
Compressed File Support => yes (gzip)
Clock Source => GetSystemTimePreciseAsFileTime

                              Diagnostic Log
No messages

                              Step Debugging
Debugger is active
Connected Client => localhost:9003

DBGp Settings
Max Children => 15
Max Data => 512
Max Depth => 3
Show Hidden Properties => No
Extended Properties => No
Notifications => No
Resolved Breakpoints => No
Breakpoint Details => No

                                   PHP
                           Build Configuration
Version (Run Time) => 7.4.30
Version (Compile Time) => 7.4.33
Debug Build => no
Thread Safety => disabled
                                 Settings
Configuration File (php.ini) Path =>
Loaded Configuration File => C:\PHP\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)

Directive => Local Value => Master Value
xdebug.mode => debug => debug
xdebug.start_with_request => yes => yes
xdebug.start_upon_error => default => default
xdebug.output_dir => C:\Windows\Temp => C:\Windows\Temp
xdebug.use_compression => 1 => 1
xdebug.trigger_value => no value => no value
xdebug.file_link_format => no value => no value
xdebug.filename_format => no value => no value
xdebug.log => C:\PHP\xdebug.log => C:\PHP\xdebug.log
xdebug.log_level => 7 => 7
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3
xdebug.max_nesting_level => 256 => 256
xdebug.cli_color => 0 => 0
xdebug.force_display_errors => Off => Off
xdebug.force_error_reporting => 0 => 0
xdebug.halt_level => 0 => 0
xdebug.max_stack_frames => -1 => -1
xdebug.show_error_trace => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.profiler_append => Off => Off
xdebug.cloud_id => no value => no value
xdebug.client_host => localhost => localhost
xdebug.client_port => 9003 => 9003
xdebug.discover_client_host => Off => Off
xdebug.client_discovery_header => no value => no value
xdebug.idekey => no value => no value
xdebug.connect_timeout_ms => 200 => 200
xdebug.scream => Off => Off
xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_return => Off => Off

xdebug.log

zobo commented 9 months ago

I don't maintain this plugin anymore as I do not have time or the environment to do it. But it was picked up and updated here https://bitbucket.org/rdipardo/dbgp/src/master/ Seems like the code can't handle some underlying XML message. I'll try to look at it and see if I can hint the new maintainer what to fix.

Also, try to move the code into a folder WITHOUT spaces.