View Issue Details

IDProjectCategoryView StatusLast Update
0002107XdebugDocumentationpublic2022-10-02 15:28
Reportershoulders Assigned Toderick  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformXampp / ApacheOSWindows 10 Pro x64 
Product Version3.1.5 
Summary0002107: stack trace links do not open in Netbeans on Windows - documentation issue
Description

I followed the instructions here: https://xdebug.org/docs/all_settings#file_link_format

After adding the information to the registry and creating the batch file as advertised and clicking on the stack trace links I get an error that the file cannot be found. (picture attached)

I am not using nircmd

The output of the batch file is as follows

C:\WINDOWS\system32>setlocal EnableExtensions EnableDelayedExpansion

C:\WINDOWS\system32>set NETBEANS="C:\Program Files\NetBeans-12.6\netbeans\bin\netbeans64.exe"

C:\WINDOWS\system32>set FILE=netbeans://open/?f=D:%5Cwebsites%5Chtdocs%5Cprojects%5Cqwcrm%5Csrc%5Ccache%5Csmarty%5Ccompile%5Cd0d7cab3fc90044dd0b29b254a87eedb88470029_0.file.financial.tpl.php:457

C:\WINDOWS\system32>"C:\Program Files\NetBeans-12.6\netbeans\bin\netbeans64.exe" --nosplash --console suppress --open "D:%5Cwebsites%5Chtdocs%5Cprojects%5Cqwcrm%5Csrc%5Ccache%5Csmarty%5Ccompile%5Cd0d7cab3fc90044dd0b29b254a87eedb88470029_0.file.financial.tpl.php:457"

My version of netbeans is different to the instructions but this is not causing any issue.

If you look at the command that opens the link in netbeans (the last one) you can see that instead of directories separated by slashes they are being separated by the equivalent HTML entity which is %5C

I have the same issue with Firefox 103.0 (64-bit) and chrome 103.0.5060.134

If I manually take that last link and swap all of the %5C to slashes and run the relevant file opens up in netbeans

So the issue is clearly for some reason the link to the file is being passed with HTML entities and not slashes.

My Solution/Workaround is in additional information below

Steps To Reproduce

follow the instructions as outlined here https://xdebug.org/docs/all_settings#file_link_format

Additional Information

PHP Info:
PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans

Solution/Workaround

I am not an expert but What I have done is taken the batch file offered at https://xdebug.org/docs/all_settings#file_link_format and added an additional step in to string replace the HTML entities into slashes before the link is passed to netbeans

set FILE=!FILE:%%5C=\!

I am not using nircmd

@echo off
setlocal enableextensions enabledelayedexpansion
set NETBEANS=%1
set FILE=%0000002:0000002
set FILE=!FILE:%%5C=\!
%NETBEANS% --nosplash --console suppress --open "%FILE:0000020:0000019%"
::nircmd win activate process netbeans.exe
Tagsfile_link_format, netbeans, Stack Trace, windows
Attached Files
netbeans-error.jpg (25,536 bytes)   
netbeans-error.jpg (25,536 bytes)   
stack-trace-link.jpg (142,193 bytes)   
stack-trace-link.jpg (142,193 bytes)   
Operating SystemWindows 10 Pro x64
PHP Version8.1.0-8.1.4

Activities

derick

2022-10-02 15:28

administrator   ~0006379

Thanks, I have now updated the snippet with your suggested work around. (And also added PhpStorm's format)

Issue History

Date Modified Username Field Change
2022-07-30 14:26 shoulders New Issue
2022-07-30 14:26 shoulders Tag Attached: file_link_format
2022-07-30 14:26 shoulders Tag Attached: netbeans
2022-07-30 14:26 shoulders Tag Attached: Stack Trace
2022-07-30 14:26 shoulders Tag Attached: windows
2022-07-30 14:26 shoulders File Added: netbeans-error.jpg
2022-07-30 14:26 shoulders File Added: stack-trace-link.jpg
2022-08-09 09:53 derick Description Updated
2022-08-09 09:53 derick Additional Information Updated
2022-10-02 15:28 derick Assigned To => derick
2022-10-02 15:28 derick Status new => closed
2022-10-02 15:28 derick Resolution open => fixed
2022-10-02 15:28 derick Note Added: 0006379