Skip to content

Extract DBGp Go CLI client from php-debugger PR #12 into standalone dbgp-client repo - #1

Open
carlos-granados with Copilot wants to merge 10 commits into
mainfrom
copilot/move-dbgp-cli-code
Open

Extract DBGp Go CLI client from php-debugger PR #12 into standalone dbgp-client repo#1
carlos-granados with Copilot wants to merge 10 commits into
mainfrom
copilot/move-dbgp-cli-code

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown

This PR migrates the Go DBGp client code from cli/dbgp in php-debugger/php-debugger PR #12 into this repository as a standalone package, with attribution preserved for the original contribution by @Haehnchen.

  • Scope moved into this repository

    • Imported the full cli/dbgp implementation into repo root:
      • client transport/command layer (client.go)
      • protocol types/parsing (protocol.go)
      • variable/context parsing (parser.go)
      • test fixtures and parser/protocol tests (*_test.go, testdata/context_get_complex.xml)
    • Added module metadata (go.mod) so the package builds/tests independently.
  • Attribution

    • Added explicit provenance note in README.md pointing to source PR and author attribution to @Haehnchen.
  • Stabilization during extraction (protocol + runtime correctness)

    • Corrected init/read-loop ordering to avoid packet races during connect.
    • Hardened response handling for disconnect/timeout paths and synchronized shared state access.
    • Improved URI/path conversion behavior (file://, Windows/UNC, escaped paths).
    • Improved breakpoint spec and nested variable parsing behavior; expanded coverage for these cases.
  • Representative behavior now covered

    // Windows/UNC + escaped path handling stays protocol-safe
    uri := MakeFileURI(`\\server\share\dir\file.php`) // file://server/share/dir/file.php
    path := FormatFileURI(uri)                        // //server/share/dir/file.php
Original prompt

I'd like to move here some of the code that is part of this PR php-debugger/php-debugger#12.
That is a go DBGP CLI client and the PR was done against the PHP Debugger extension repository. We want to move it into an independent repo so please move all files within the cli/dbgp folder in that PR to the root folder of this new repo.
Not sure if it is possible to keep the attribution of the code, if it is possible please attribute it to @Haehnchen

Copilot AI and others added 9 commits September 10, 2026 15:59
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Co-authored-by: carlos-granados <1383106+carlos-granados@users.noreply.github.com>
Copilot AI changed the title [WIP] Move DBGP CLI client code to new repository Extract DBGp Go CLI client from php-debugger PR #12 into standalone dbgp-client repo Sep 10, 2026
@carlos-granados

Copy link
Copy Markdown
Contributor

@copilot is this PR still a draft or can it be moved to ready for review?

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Author

@copilot is this PR still a draft or can it be moved to ready for review?

It can be moved to ready for review. The extraction and follow-up fixes are in, and the Go tests are passing locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants