- Set a breakpoint somewhere
- setup auto attach: always so any node command will allow debugging automatically
- Open a Javascript Terminal in vscode
- Run the yarn watch command (or whatever script you are running)
- Open the browser links FROM INSIDE the javascript terminal, or: use the Debug: Open Link command, and enter the destination url there.
- Enjoy the debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\module\Plugin\Preprocess; | |
use Drupal\Core\Cache\CacheableMetadata; | |
use Drupal\Core\Render\Element; | |
use Drupal\preprocess\PreprocessPluginBase; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Programmatically create files. | |
use Drupal\file\Entity\File; | |
$file = File::create([ | |
'uid' => 1, | |
'filename' => 'logo.svg', | |
'uri' => 'public://page/logo.svg', | |
'status' => 1, | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fun little set of text generation functions originally created for some custom data volume generation. | |
*/ | |
/** | |
* Generate an simple text address. | |
* | |
* - 43 Fable Lane, San Francisco, CA 39508 | |
* - 219 Marketing Canyon, New York, NY 11672 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/usr/local/bin:$PATH | |
export AH_SITE_NAME=sf2 | |
#aliases | |
alias php53="/Users/dsasser/switch-php-versions.sh 3" | |
alias php55="/Users/dsasser/switch-php-versions.sh 5" | |
alias php52="/Users/dsasser/switch-php-versions.sh 2" | |
# Environment Vars | |
export DRUSH_NO_MIN_PHP=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#switch to using a different version of php | |
#rm /usr/local/php5 | |
PHP53="php5-5.3.28-20140112-174528" | |
PHP55="php5-5.5.14-20140628-105310" | |
ROOT_PATH="/usr/local" | |
switch () { |