Public access to modify returned file from findLocation()?

Notice: This thread is very old.
adrianbj
Member | 31
+
0
-

Sorry for the barrage of questions. Hope I am not wearing out my welcome.

I don't think there is currently a way to do this.

I am looking for a way to be able to perform a simple string replace on the path to file/line as linked from an error/dump/barDump as determined by the findLocation() method. Not sure the best approach for doing this. Could it be an option parameters passed via Debugger::$editor – maybe an array containing $search and $replace values that will be applied to %file ?

For the moment I am doing it with a core hack modifying $file after:
list($file, $line, $code) = $loc ? self::findLocation() : NULL;

Any chance you would consider adding the ability to do this?

Just to clarify this is because the files are run through a compiler – line numbers don't change, but obviously I don't want the edit links to point to the compiled version.

Thanks for letting me know if there is a current option that might work or for considering adding this functionality.

adrianbj
Member | 31
+
0
-

Also just thinking another use case for this would be to return the local dev path to a file even when clicking from a live version of the site. But maybe this would be manipulated via Helpers::editorLink() so that the displayed path is not affected?

adrianbj
Member | 31
+
0
-

Or maybe a “path_mapping” configuration option could be provided – something like how xdebug does it?

adrianbj
Member | 31
+
0
-

Sorry, this is really a duplicate of: https://forum.nette.org/…n-virtualbox

adrianbj
Member | 31
+
0
-

This has been taken care of: https://github.com/…0bde1320d35c