Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
261
Reporter ?
MacGDBp / 2.0
Status ?
Closed
Severity ?
Moderate
Duplicate Of ?
- none -
Fixed in Revision ?
90f34b6d84f38b6fa4bc52784a47a4a970ee3156
Mstone ?
2.0.1
Summary ?
Large files never load when attempting to set a breakpoint
Report Time ?
April 6, 2020 12:14 AM
Assignment ?
Resolution ?
Fixed
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?


Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0

April 6, 2020 12:14 AM Robert
Reported from https://groups.google.com/d/msgid/bluestatic/84a11ca5-eea3-4d6d-bfdc-c52068b1cf42%40googlegroups.com

"""
I'm unable to add breakpoints in large PHP files. For example, I tried to add a breakpoint at line 843 in a file of the Drupal Core.

Reproduce:
- Clone/Install Drupal 8 Core (https://git.drupalcode.org/project/drupal, 8.8.X);
- Go to breakpoint Tab;
- Click the `+` symbol to add a "Line Number" (breakpoint);
- Select the file in the file browser;
- Click ok;
Nothing will happen; the file doesn't appear in the list of breakpoints.
"""

April 6, 2020 12:18 AM Robert
What is happening is the standard out pipe buffer is getting full because MacGDBp is not reading from it as the php command is producing output.

Compare version 1.5, which would start reading from the pipe buffer immediately after launching: https://src.bluestatic.org/?p=macgdbp.git;a=blob;f=Source/BSSourceView.mm;h=4042c5d361dc64b79339da9decbd8572b0a95486;hb=0508dff4d4670e79a64e424e4a66af1d2003468e#l82

Versus version 2.0, which waits until the task terminates to read from the pipe buffer: https://src.bluestatic.org/?p=macgdbp.git;a=blob;f=Source/BSSourceView.mm;h=7899dfc1ad341dcea8461880dbfa95841c011675;hb=8eef7c99bed2f60c4daf9b9afc370b0ef413bdc2#l222

In 2.0, you can see the php process running from MacGDBp:

% ps ax | grep php
54384 ?? S 0:00.06 /usr/bin/php --syntax-highlight --define highlight.string="#fb2025" --define highlight.comment="#fc8108" --define highlight.default="#0a5ffe" --define highlight.html="#7b7b80" /Users/rsesek/Downloads/core_lib_Drupal_Core_Entity_Sql_SqlContentEntityStorageSchema.php

And sampling it shows waiting on the write() system call:
9002 Thread_23592737 DispatchQueue_1: com.apple.main-thread (serial)
9002 start (in libdyld.dylib) + 1 [0x7fff70d4c3d5]
9002 ??? (in php) load address 0x100000000 + 0x40a268 [0x10040a268]
9002 ??? (in php) load address 0x100000000 + 0x40aecf [0x10040aecf]
9002 zend_highlight (in php) + 117 [0x10036564e]
9002 lex_scan (in php) + 705 [0x10033d7af]
9002 zend_error (in php) + 124 [0x1003710f2]
9002 ??? (in php) load address 0x100000000 + 0x371386 [0x100371386]
9002 ??? (in php) load address 0x100000000 + 0x21a65b [0x10021a65b]
9002 ??? (in php) load address 0x100000000 + 0x31b022 [0x10031b022]
9002 php_printf (in php) + 163 [0x1003189db]
9002 php_output_write (in php) + 67 [0x10032aa8a]
9002 ??? (in php) load address 0x100000000 + 0x32ab82 [0x10032ab82]
9002 ??? (in php) load address 0x100000000 + 0x40b646 [0x10040b646]
9002 sapi_cli_single_write (in php) + 78 [0x100409d03]
9002 write (in libsystem_kernel.dylib) + 10 [0x7fff70e84f46]

MacGDBp needs to start reading from the pipe after launching the task, not after waiting for it to complete.

On April 6, 2020 01:31 AM, Robert changed: