diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md deleted file mode 100644 index 77a4c5b..0000000 --- a/docs/getting-started/introduction.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Introduction ---- - -PHP Debugger is a modern debugging extension for PHP that focuses exclusively on step debugging functionality. It leaves out profiling, coverage, and tracing entirely 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. - -## Key Features - -Everything you need for a great debugging experience: - -- **[Breakpoints](../user-guide/breakpoints.md)** — set breakpoints anywhere in your code with conditional support. -- **[Step Debugging](../user-guide/step-debugging.md)** — step over, into, and out of code with ease. -- **[Variable Inspection](../user-guide/inspect-variables.md)** — inspect variables, objects, arrays, and their properties. -- **[Watch Expressions](../user-guide/watch-expressions.md)** — watch expressions and get notified when they change. -- **[CLI & Remote](../advanced/remote-debugging.md)** — debug CLI scripts and remote applications. -- **[Logging](../user-guide/logging.md)** — powerful logging capabilities for debugging and tracing. - -## What's Next? - -Ready to get started? Install PHP Debugger and try the quick start guide: - -- [Installation Guide](./installation.md) -- [Quick Start](./quick-start.md) diff --git a/docs/getting-started/introduction.mdx b/docs/getting-started/introduction.mdx new file mode 100644 index 0000000..1f48a3d --- /dev/null +++ b/docs/getting-started/introduction.mdx @@ -0,0 +1,19 @@ +--- +title: Introduction +--- + +import BenefitGrid from '@site/src/components/BenefitGrid'; + +[PHP Debugger](https://github.com/php-debugger/php-debugger) is a step debugger for PHP, and nothing else. Every other feature that +normally ships alongside one — the profiler, the coverage collector, the tracer — has +been left out. What remains is a debugger you can leave switched on permanently, +because when you are not using it you can barely tell it is there. + + + +## What's Next? + +Ready to get started? Install PHP Debugger and try the quick start guide: + +- [Installation Guide](./installation.md) +- [Quick Start](./quick-start.md) diff --git a/src/components/BenefitGrid/index.js b/src/components/BenefitGrid/index.js new file mode 100644 index 0000000..e957da3 --- /dev/null +++ b/src/components/BenefitGrid/index.js @@ -0,0 +1,115 @@ +import styles from './styles.module.css'; + +const iconProps = { + width: 26, + height: 26, + viewBox: '0 0 24 24', + fill: 'none', + stroke: 'currentColor', + strokeWidth: 1.8, + strokeLinecap: 'round', + strokeLinejoin: 'round', +}; + +const benefits = [ + { + title: 'Near-zero overhead when idle', + text: 'With no debug client connected, the debugger stays out of the way. A typical web request does around 1% more work than running with no debugger at all.', + icon: ( + + + + + + ), + }, + { + title: 'Cheap while you are attached', + text: 'Keep your IDE connected all day. A session you are attached to but not actively stepping through still costs very little.', + icon: ( + + + + + ), + }, + { + title: 'Drop-in compatible', + text: 'Existing INI settings, IDE configurations, and helper functions keep working. In most projects there is almost nothing to migrate — just the line that loads the extension.', + icon: ( + + + + + + ), + }, + { + title: 'Works with your editor', + text: 'Full DBGp protocol support means any IDE or tool that speaks it just works — PhpStorm, VS Code, Neovim, and anything else in your setup.', + icon: ( + + + + + ), + }, + { + title: 'Everything you expect', + text: 'Breakpoints and conditional breakpoints. Step over, into, and out. Inspect variables, objects, and arrays, and watch expressions change as you go.', + icon: ( + + + + + + + + ), + }, + { + title: 'One job, done well', + text: 'No profiler, no code coverage, no tracing. Step debugging is the only thing here, which is exactly why the rest of the time it costs you so little.', + icon: ( + + + + + + ), + }, + { + title: 'Nothing to install', + text: 'Use it as a regular extension, or reach for a container image with the debugger compiled straight into the interpreter. Change one line of your Dockerfile and you are done.', + icon: ( + + + + + ), + }, + { + title: 'Ready the moment you are', + text: 'However you install it, debugging is on by default and starts with every request. Set a breakpoint, hit your app, and the session is already there — no trigger to remember.', + icon: ( + + + + + ), + }, +]; + +export default function BenefitGrid() { + return ( +
+ {benefits.map(({title, text, icon}) => ( +
+ {icon} +

{title}

+

{text}

+
+ ))} +
+ ); +} diff --git a/src/components/BenefitGrid/styles.module.css b/src/components/BenefitGrid/styles.module.css new file mode 100644 index 0000000..d1f2389 --- /dev/null +++ b/src/components/BenefitGrid/styles.module.css @@ -0,0 +1,38 @@ +.grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1rem; + margin: 2rem 0 2.5rem; +} + +.card { + border: 1px solid var(--phpdbg-card-border); + border-radius: 10px; + background: var(--phpdbg-surface); + padding: 1.25rem 1.35rem 1.35rem; +} + +.icon { + display: block; + color: var(--ifm-color-primary); + margin-bottom: 0.75rem; +} + +.cardTitle { + font-size: 1.05rem; + line-height: 1.3; + margin: 0 0 0.4rem; +} + +.cardText { + font-size: 0.9rem; + line-height: 1.6; + color: var(--ifm-color-emphasis-700); + margin: 0; +} + +@media (max-width: 768px) { + .grid { + grid-template-columns: minmax(0, 1fr); + } +} diff --git a/src/components/HomeCards/index.js b/src/components/HomeCards/index.js index ed683ff..3cbb5f6 100644 --- a/src/components/HomeCards/index.js +++ b/src/components/HomeCards/index.js @@ -60,7 +60,7 @@ export default function HomeCards() { } title="Key Features" - linkTo="/getting-started/introduction#key-features" + linkTo="/getting-started/introduction" linkLabel="Explore all features">