Skip to content

Commit 7bc7d43

Browse files
Merge pull request #2 from php-debugger/site-redesign
Site redesign using Docusaurus
2 parents 375056b + 4d9b768 commit 7bc7d43

50 files changed

Lines changed: 21665 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v7
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v7
20+
with:
21+
node-version: 20
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build with Docusaurus
28+
run: npm run build
29+
30+
- name: Deploy to GitHub Pages
31+
uses: JamesIves/github-pages-deploy-action@v4.9.0
32+
with:
33+
folder: build
34+
branch: gh-pages
35+
clean-exclude: pr-preview
36+
force: false

.github/workflows/preview.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy PR previews
2+
3+
concurrency: preview-${{ github.ref }}
4+
5+
on:
6+
pull_request:
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
11+
- closed
12+
13+
jobs:
14+
deploy-preview:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v7
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v7
22+
with:
23+
node-version: 20
24+
cache: npm
25+
if: github.event.action != 'closed'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
if: github.event.action != 'closed'
30+
31+
- name: Build with Docusaurus
32+
run: npm run build
33+
env:
34+
BASE_URL: "/pr-preview/pr-${{ github.event.pull_request.number }}/"
35+
if: github.event.action != 'closed'
36+
37+
- name: Deploy PR Preview
38+
uses: rossjrw/pr-preview-action@v1
39+
with:
40+
source-dir: build
41+
preview-branch: gh-pages
42+
umbrella-dir: pr-preview
43+
action: auto

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Design mockups (reference only, not part of the site)
2+
/design
3+
4+
# Dependencies
5+
/node_modules
6+
7+
# Production
8+
/build
9+
10+
# Generated files
11+
.docusaurus
12+
.cache-loader
13+
14+
# Misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
# website
2-
The code behind the public php-debugger.dev website
1+
# php-debugger.github.io
2+
3+
The code behind the public php-debugger.dev website, built with [Docusaurus](https://docusaurus.io/).
4+
5+
## Development
6+
7+
```bash
8+
npm install
9+
npm run start # dev server with hot reload at http://localhost:3000
10+
```
11+
12+
## Production build
13+
14+
```bash
15+
npm run build # outputs to build/, fails on broken internal links
16+
npm run serve # serve the production build locally (search works here)
17+
```
18+
19+
## Deployment
20+
21+
- **Pull requests**: `.github/workflows/preview.yml` builds the site with the PR-specific base path and deploys a preview to the `gh-pages` branch under `pr-preview/pr-<N>/`.
22+
- **Push to `main`**: `.github/workflows/deploy.yml` builds and deploys the site to the `gh-pages` branch, which GitHub Pages serves.
23+
24+
## Content
25+
26+
Documentation pages are Markdown files in `docs/`, organised by sidebar category (see `sidebars.js`). The home page is `docs/index.mdx`, composed from the React components in `src/components/`. Design mockups live in `design/` for reference.

docs/advanced/performance.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Performance
3+
---
4+
5+
How PHP Debugger achieves near-zero overhead when not connected, and how to measure its impact.
6+
7+
:::note
8+
This page is a work in progress — full documentation is coming soon.
9+
:::

docs/advanced/remote-debugging.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Remote Debugging
3+
---
4+
5+
Debug applications running in containers, VMs, or remote servers by connecting back to your local IDE.
6+
7+
:::note
8+
This page is a work in progress — full documentation is coming soon.
9+
:::

docs/advanced/troubleshooting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Troubleshooting
3+
---
4+
5+
Common problems and how to diagnose them: connection issues, missed breakpoints, and logging.
6+
7+
:::note
8+
This page is a work in progress — full documentation is coming soon.
9+
:::
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Configuration
3+
---
4+
5+
PHP Debugger is configured through `php.ini` directives. Because it is a fork of Xdebug, most settings will look familiar — with the `php_debugger.` prefix.
6+
7+
## Common settings
8+
9+
```ini
10+
zend_extension=php_debugger
11+
12+
; debug is the only mode; profiling, coverage, and tracing were removed
13+
php_debugger.mode=debug
14+
15+
; start a session only when triggered (recommended), or always
16+
php_debugger.start_with_request=trigger
17+
18+
; where your IDE is listening
19+
php_debugger.client_host=127.0.0.1
20+
php_debugger.client_port=9003
21+
```
22+
23+
## Directives
24+
25+
| Directive | Default | Description |
26+
| --- | --- | --- |
27+
| `php_debugger.mode` | `debug` | Operating mode. Set to `off` to disable the extension entirely. |
28+
| `php_debugger.start_with_request` | `trigger` | `trigger` starts a session only when a trigger is present; `yes` starts on every request. |
29+
| `php_debugger.client_host` | `127.0.0.1` | Host the debugger connects back to (your IDE). |
30+
| `php_debugger.client_port` | `9003` | Port the debugger connects back to. |
31+
32+
See the [Configuration File](../reference/configuration-file.md) reference for the complete list of directives, and [Environment Variables](../reference/environment-variables.md) for runtime overrides.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Installation
3+
---
4+
5+
Installing PHP Debugger is straightforward and similar to installing other PHP extensions. The extension is available through PIE and can also be compiled from source. Once installed, you'll need to configure your php.ini file to enable the extension and set up your IDE to communicate with the debugger using the DBGp protocol.
6+
7+
## Configuration
8+
9+
Add the following to your `php.ini` file:
10+
11+
```ini
12+
zend_extension=php_debugger
13+
php_debugger.mode=debug
14+
php_debugger.start_with_request=trigger
15+
php_debugger.client_host=127.0.0.1
16+
php_debugger.client_port=9003
17+
```
18+
19+
## Usage Example
20+
21+
You can trigger breakpoints programmatically in your PHP code:
22+
23+
```php
24+
<?php
25+
function processData($data) {
26+
// Process some data
27+
$result = transform($data);
28+
29+
// Trigger breakpoint for debugging
30+
php_debugger_break();
31+
32+
return $result;
33+
}
34+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Introduction
3+
---
4+
5+
PHP Debugger is a modern debugging extension for PHP that focuses exclusively on step debugging functionality. Built as a fork of Xdebug, it removes profiling, coverage, and tracing features to achieve near-zero overhead when debugging is not active. This makes it ideal for development environments where you want debugging capabilities without impacting performance during regular development work.
6+
7+
## Key Features
8+
9+
Everything you need for a great debugging experience:
10+
11+
- **[Breakpoints](../user-guide/breakpoints.md)** — set breakpoints anywhere in your code with conditional support.
12+
- **[Step Debugging](../user-guide/step-debugging.md)** — step over, into, and out of code with ease.
13+
- **[Variable Inspection](../user-guide/inspect-variables.md)** — inspect variables, objects, arrays, and their properties.
14+
- **[Watch Expressions](../user-guide/watch-expressions.md)** — watch expressions and get notified when they change.
15+
- **[CLI & Remote](../advanced/remote-debugging.md)** — debug CLI scripts and remote applications.
16+
- **[Logging](../user-guide/logging.md)** — powerful logging capabilities for debugging and tracing.
17+
18+
## What's Next?
19+
20+
Ready to get started? Install PHP Debugger and try the quick start guide:
21+
22+
- [Installation Guide](./installation.md)
23+
- [Quick Start](./quick-start.md)

0 commit comments

Comments
 (0)