GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Development console by thekid · Pull Request #35 · xp-forge/web

Conversation

@thekid

@thekid thekid commented Feb 12, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This pull request adds a development console, which is shown if any output is generated via output, echo or other PHP output functionality. It will show the output as well as the HTTP response generated from the code as seen below.

This enables var_dump()-driven development on an entirely new level.

Application

class Hello extends \web\Application {

  public function routes() {
    return [
      '/' => function($req, $res) {
        // var_dump($req->headers());
        $res->answer(200, 'OK');
        $res->send('Hello World', 'text/plain');
      }
    ];
  }
}

Regular request

image

Request w/ var_dump uncommented

image

Enabling the console

This console is enabled inside the development webserver, which is launched by passing -m develop. If developing inside Apache or PHP-FPM, install the development console by prepending the WEB_SOURCE environment variable pointing to the application class with +xp.web.dev.Console.

/cc @georg94 @mikey179

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
thekid added 4 commits February 12, 2018 21:09
@thekid
Add development console
2c4fbca
@thekid
Activate dev console by default in -m develop
a873bcf
@thekid
Install filters passed along via application[+filter[,filter[,...]]]
67f9cff
@thekid
Remove debug code
190fdc7
@thekid thekid added the enhancement label Feb 12, 2018
thekid added 3 commits February 12, 2018 21:26
@thekid
QA: Add xp.web.srv.Server interface
7b033e6
@thekid
Include "Remote-Addr" to be consistent with standalone input
51d3b2e
@thekid
Add button title
1d03457
@thekid
thekid merged commit 6fde8cf into master Feb 12, 2018
@thekid
thekid deleted the feature/dev-console branch February 12, 2018 21:24
@thekid

thekid commented Feb 12, 2018

Copy link
Copy Markdown
Member Author

Released in https://github.com/xp-forge/web/releases/tag/v0.14.0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thekid thekid mentioned this pull request Jun 13, 2021
Make "async" the default server model #81
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@thekid
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.