Coder Social home page Coder Social logo

Comments (4)

dansysanalyst avatar dansysanalyst commented on September 26, 2024 1

Hi @p08dev,

Is this what you mean?

https://laradumps.dev/#/laravel/get-started/configuration?id=remote-vscode-wsl2

DS_PREFERRED_IDE=vscode_remote
DS_PREFERRED_WSL_DISTRO=Ubuntu
DS_REMOTE_PATH=/home/jamesbond/Projects/save-the-queen-app
DS_WORKDIR=/var/www/html

from laradumps.

dansysanalyst avatar dansysanalyst commented on September 26, 2024 1

Hi @p08dev,

I have tested this approach with Laravel Sail (Docker) and my host system is macOS, hopefully it will be helpful.

First, create a new editor handler inside config/laradumps.php. I called mine vscode_docker:

    'ide_handlers' => [
        //other ides...

        'vscode_docker' => [
            'handler'        => 'vscode://file/',
            'line_separator' => ':',
            'remote_path'    => '/Users/dan/projects/my-project', //<============ Path on my machine host
            'work_dir'       => '/var/www/html'  //<============ Path inside Docker
        ],
    ],

Then, I configured:

remote_path as my macOS path, the folder where my project lives.
work_dir as the path inside Docker.

(I know, it doesn't match the key name)

Next, I've updated .env to use this new configuration:

DS_APP_HOST=host.docker.internal
DS_APP_PORT=9191
DS_SEND_QUERIES=true
DS_SEND_HTTP_CLIENT_REQUESTS=true
DS_SEND_JOBS=true
DS_SEND_COMMANDS=true
DS_SEND_LOGS=true
DS_SEND_LIVEWIRE_COMPONENTS=true
DS_LIVEWIRE_EVENTS=true
DS_LIVEWIRE_DISPATCH=true
DS_SEND_LIVEWIRE_FAILED_VALIDATION=true
DS_AUTO_CLEAR_ON_PAGE_RELOAD=false
DS_AUTO_INVOKE_APP=false
DS_PREFERRED_IDE=vscode_docker #<======

Now, you should be getting LaraDumps to open your

This is not intuitive, and I believe there is room for improvement in V2.

cc: @luanfreitasdev

from laradumps.

p08dev avatar p08dev commented on September 26, 2024

Hey @dansysanalyst,

kind of... I am on macOS, running my project in Docker. If I configure it like the documentation describes, it starts vscode but won't open any file:

Screenshot 2023-02-13 at 10 29 46

It only shows "Disconnected from WSL".
Here is my .env:

DS_APP_HOST=host.docker.internal
DS_APP_PORT=9191
DS_SEND_QUERIES=true
DS_SEND_HTTP_CLIENT_REQUESTS=true
DS_SEND_JOBS=true
DS_SEND_COMMANDS=true
DS_SEND_LOGS=true
DS_SEND_LIVEWIRE_COMPONENTS=true
DS_LIVEWIRE_EVENTS=true
DS_LIVEWIRE_DISPATCH=true
DS_SEND_LIVEWIRE_FAILED_VALIDATION=true
DS_AUTO_CLEAR_ON_PAGE_RELOAD=false
DS_AUTO_INVOKE_APP=true

DS_PREFERRED_IDE=vscode_remote
DS_PREFERRED_WSL_DISTRO=Ubuntu
DS_REMOTE_PATH=/Users/p8/Projects/test-project
DS_WORKDIR=/var/www/html

Am I missing something, or does this only support WSL?

from laradumps.

p08dev avatar p08dev commented on September 26, 2024

Thanks, @dansysanalyst! It works! I should have thought of that...

from laradumps.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.