Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Fix file path regex pattern in stack trace response #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dbywalec
Copy link

The original regex pattern would encounter for characters other than white space (\S)
as part of the file path. In some cases this is not true.
Apparently a space is a valid file path character and must be encountered for.

This bug would prevent the VSCode from stopping on break points, whereas
the actual Perl debugger would indicate a break point was hit.

Fixes #104

The original regex pattern would encounter for characters other than white space (\S)
as part of the file path. In some cases this is not true.
Apparently a space is a valid file path character and must be encountered for.

This bug would prevent the VSCode from stopping on break points, whereas
the actual Perl debugger would indicate a break point was hit.
@raix
Copy link
Owner

raix commented Aug 24, 2019

Thanks @dbywalec for creating the pr :) - it seems to be triggering issues in the travis tests - I'm thinking we have to move more complex regex's to the regEx.ts file and add some tests for it there

@dbywalec
Copy link
Author

Thanks for feedback. I thought it would have been a low hanging fruit.
I tested empirically only and this modification worked for me on Windows 7 platform.

I did not anticipate changing such as an isolated line of code would break any other tests.
At least you know what the clue of the issue is.
I do not have sufficient skills in JS and node to be able to run test easily within reasonable amount of time.

Perhaps a simpler regular expression for file path would do:
const m = line.match(/^(\S+) = (\S+) called from file \'([^\']+)\' line ([0-9]+)$/);

I will be glad to test on a live example as soon as you have come up with some better solution.

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

Successfully merging this pull request may close these issues.

Dashes and spaces in directory under Windows
2 participants