My Windows explorer.exe crashes then any open File Explorer Windows close, RetroTask bar and the normal taskbar underneath are restarted. these following is what I have done to track this down. It is most likely an app with faulty Shell Extensions (ShellEx).
The crashing can happen on it's own, sometimes when I right click but because I have not found a pattern to trigger the crash, the diagnosis of the cause is very hard.
Look at this article first
- How to Find Which Shell Extension Is Crashing Explorer.exe | ShellEx Info
- Your taskbar disappears and reappears. Your desktop goes black for a moment. You get the dreaded “Windows Explorer has stopped working” dialog. Something is crashing
explorer.exe, and the most likely culprit is a faulty shell extension DLL.- A systematic guide to identifying the exact shell extension DLL that causes explorer.exe crashes, freezes, and restarts on Windows 11 and 10, from quick 2-minute checks to advanced debugging techniques.
- Some of my article shares the same information, but was gathered before I found this article.
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
Get-AppxPackage Microsoft.Windows.ShellExperienceHost | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage Microsoft.Windows.StartMenuExperienceHost | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -AllUsers | ForEach { Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" }
The faulting module (a dll file) is usually the cause and is usually very easy to find. However with my issue the faulting module is C:\Windows\System32\Windows.UI.Xaml.dll but it is the program calling it that is the issue.
Below is a couple of methods.

Faulting application name: Explorer.EXE, version: 10.0.26100.9444, time stamp: 0x03f6c974 Faulting module name: Windows.UI.Xaml.dll, version: 10.0.26100.9444, time stamp: 0x8139c357 Exception code: 0xc000027b Fault offset: 0x000000000090e383 Faulting process id: 0x20B8 Faulting application start time: 0x1DD5968EB1F0045 Faulting application path: C:\Windows\Explorer.EXE Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report Id: 099d4021-6484-492a-9b33-c38a18fcf5b2 Faulting package full name: Faulting package-relative application ID:
Windows.UI.Xaml.dll, however this is not the root cause.0xc000027b is a stowed exception. This is from my own knowledge, not the search results. A XAML/WinRT component inside Explorer hit an unhandled error, and Windows.UI.Xaml.dll is just the module that raised it.This can be very useful, but to get the most out of it you need to have some skills.
# Create dump directory New-Item -Path "C:\CrashDumps" -ItemType Directory -Force # Configure Windows Error Reporting to create full dumps $dump = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe" New-Item -Path $dump -Force Set-ItemProperty -Path $dump -Name "DumpType" -Value 2 -Type DWord Set-ItemProperty -Path $dump -Name "DumpFolder" -Value "C:\CrashDumps" -Type ExpandString Set-ItemProperty -Path $dump -Name "DumpCount" -Value 5 -Type DWord
Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe"
!analyze -v
### This is not the complete analysis EXCEPTION_RECORD: (.exr -1) ExceptionAddress: 00007ffbea30e383 (Windows_UI_Xaml!DirectUI::ErrorHelper::ProcessUnhandledError+0x00000000000000fb) ExceptionCode: c000027b ExceptionFlags: 00000001 NumberParameters: 2 Parameter[0]: 00000000035254a0 Parameter[1]: 0000000000000033 ... SYMBOL_NAME: Windows_UI_Xaml!CLayoutManager::UpdateLayout+5f7 MODULE_NAME: Windows_UI_Xaml IMAGE_NAME: Windows.UI.Xaml.dll FAILURE_BUCKET_ID: STOWED_EXCEPTION_XAML_TEXT_Layout_cycle_detected.__Layout_could_not_complete_802b0014_Windows.UI.Xaml.dll!CLayoutManager::UpdateLayout
Windows.UI.Xaml.dll but not what performed an incorrect call to it.Windows_UI_Xaml didn’t fail on its own. It killed explorer.exe on purpose because the XAML layout never settled. Your dump doesn’t say which element caused it.c000027b code is a stowed exception. XAML caught its own error and called RaiseFailFastException, so this is a deliberate fail-fast, not memory corruption or an access violation.CTray::MainThreadProc → CTray::_MessageLoop). It hit the problem in a normal XAML render tick (CXcpBrowserHost::OnTick → NWDrawTree → UpdateLayout). That points to a XAML surface hosted in the shell, such as the taskbar, system tray, or a flyout. No single control is identified.dx @$curprocess.Modules.Where(m => !m.Name.ToLower().Contains("\\windows\\")).Select(m => m.Name)
@$curprocess.Modules.Where(m => !m.Name.ToLower().Contains("\\windows\\")).Select(m => m.Name)
[0x1] : C:\Program Files\7-Zip\7-zip.dll
[0x2] : C:\Program Files\FileZilla FTP Client\fzshellext_64.dll
[0x3] : C:\Program Files (x86)\Beyond Compare 3\BCShellEx64.dll
[0xc] : C:\Program Files\Agent Ransack\ShellExt.dll
[0x16] : C:\Program Files\Notepad++\contextMenu\NppShell.dll
[0x18] : C:\Program Files\Windows Defender\shellext.dll
[0x19] : C:\Program Files\LockHunter\LHShellExt64.dll
[0x1a] : C:\Program Files (x86)\UltraISO\isoshl64.dll
[0x1b] : C:\Program Files\WinRAR\RarExt.dll
[0x3b] : C:\Program Files\Open-Shell\StartMenuDLL.dll
[0x47] : C:\Program Files\Open-Shell\ClassicExplorer64.dll
[0x67] : C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll
[0x117] : C:\Program Files\Windows Photo Viewer\PhotoBase.dll
.exr -1
0:106> .exr -1 ExceptionAddress: 00007ffbea30e383 (Windows_UI_Xaml!DirectUI::ErrorHelper::ProcessUnhandledError+0x00000000000000fb) ExceptionCode: c000027b ExceptionFlags: 00000001 NumberParameters: 2 Parameter[0]: 00000000035254a0 Parameter[1]: 0000000000000033
Remove-Item "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe" -Recurse
C:\CrashDumps\I have not done this.
Options → Enable Boot Logging if you also need to catch processes that load it at startup.Ctrl+L.Path contains Windows.UI.Xaml.dll.Operation is Load Image.tasklist /m Windows.UI.Xaml.dll
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Users\shoulders> tasklist /m Windows.UI.Xaml.dll Image Name PID Modules ========================= ======== ============================================ ApplicationFrameHost.exe 11848 Windows.UI.Xaml.dll CHXSmartScreen.exe 20224 Windows.UI.Xaml.dll ShellHost.exe 1716 Windows.UI.Xaml.dll explorer.exe 10088 Windows.UI.Xaml.dll explorer.exe 22192 Windows.UI.Xaml.dll SearchHost.exe 20952 Windows.UI.Xaml.dll StartMenuExperienceHost.e 26920 Windows.UI.Xaml.dll ShellExperienceHost.exe 6512 Windows.UI.Xaml.dll TextInputHost.exe 20644 Windows.UI.Xaml.dll SystemSettings.exe 8828 Windows.UI.Xaml.dll WindowsTerminal.exe 7048 Windows.UI.Xaml.dll PS C:\Users\shoulders>
StartMenuExperienceHost.exe, but there are so many users of this software, the crashing would of been fixed by now.explorer.exe, and the most likely culprit is a faulty shell extension DLL.Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe"
Remove-Item "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe" -Recurse
dx @$curprocess.Modules.Where(m => !m.Name.ToLower().Contains("\\windows\\")).Select(m => m.Name)
C:\ProgramData\Dbg\sym
Get-AppxPackage -AllUsers | ForEach { Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" }
Windows.UI.Xaml.dll directly. If rollback and re‑registration fail, the in‑place repair install as suggested below is the final possible fix without data loss.Win+R) → perfmon /rel — fastest, most reliable route
These are my QEMU notes
- KVM gives access to the host hardware through the kernel.
- QEMU emulates the hardware.
QEMU is by it's nature only a command line application, however you can install QtEMU (Windows) or virt-manager (Linux).
This is an example batch script to run QEMU directly from the command line.
This will run a virtio-blk, RAW image file, Logical and Physical sectors set to 4096 and boots with UEFI (GPT, with an EFI System Partition)?
if not exist "D:\VM Backups\Web_Server_OVMF_VARS.fd" copy "C:\Program Files\qemu\share\edk2-i386-vars.fd" "D:\VM Backups\Web_Server_OVMF_VARS.fd" "C:\Program Files\qemu\qemu-system-x86_64.exe" ^ -L "C:\Program Files\qemu\share" ^ -drive if=pflash,format=raw,readonly=on,file="C:\Program Files\qemu\share\edk2-x86_64-code.fd" ^ -drive if=pflash,format=raw,file="D:\VM Backups\Web_Server_OVMF_VARS.fd" ^ -monitor tcp:127.0.0.1:36000,server,nowait ^ -cpu qemu64 ^ -k en-gb ^ -vga std ^ -machine pc ^ -accel whpx ^ -drive file="D:\VM Backups\Web_Server_disk_2026-09-09.raw",if=none,id=drive0,format=raw ^ -device virtio-blk-pci,drive=drive0,logical_block_size=4096,physical_block_size=4096 ^ -net nic,model=virtio-net-pci ^ -net user ^ -serial tcp:127.0.0.1:1370,server,nowait ^ -rtc base=localtime,clock=rt ^ -object rng-builtin,id=rng0 ^ -device virtio-rng-pci,rng=rng0 ^ -device virtio-balloon-pci ^ -device virtio-keyboard-pci ^ -device qemu-xhci,id=aqemu_usb_hub ^ -name test ^ -display sdl,show-cursor=on,gl=on
edk2-x86_64-code.fd / edk2-i386-vars.fd are the filenames used by the official QEMU-for-Windows builds (weilnetz.de)-drive line if you want to swap the image type.
raw -drive file="D:\VM Backups\Web_Server_disk_2026-09-09.raw",if=none,id=drive0,format=raw ^ qcow -drive file="D:\VM Backups\Web_Server_disk_2026-09-09.qcow",if=none,id=drive0,format=qcow ^ qcow2 -drive file="D:\VM Backups\Web_Server_disk_2026-09-09.qcow2",if=none,id=drive0,format=qcow2 ^
^ is a batch file thing to say, this is not the end of the line, carry on. It allows you to split one long line for easier reading. ` (backtick) is the PowerShell version.virtio-scsi disk
-device virtio-scsi-pci,id=scsi0 \ -drive file=disk.qcow2,if=none,id=drive0,format=qcow2 \ -device scsi-hd,drive=drive0,bus=scsi0.0,physical_block_size=4096,logical_block_size=4096
logical_block_size and physical_block_size as device properties on the drive/device (not on qemu-img). You set them via -device (or -global), not as a qemu-img switch. physical_block_size and logical_block_size valuesphysical_block_size=512 and logical_block_size=512 values-global scsi-hd.physical_block_size=4k -global scsi-hd.logical_block_size=4k
Information relating to QEMU hardware devices
physical_block_size is not restricted — only logical_block_size is pinned to 512. So you can do "512e" emulation (4Kn-style physical alignment reported to the guest, but still addressed in 512-byte logical sectors):
Might move to its own page
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
qemu-img create and qemu-img convert using the -o option. This section describes each format and the options that are supported for it.virt-manager for the frontend.C:\Users\<username>\AppData\Local\aqemu\AQEMU\VMs
C:\Program Files\WindowsApps\30932PhilipSempers.AQEMUVMManager_1.1.0.0_x64__ke0bq3v0p1hwa\qemu-system-x86_64.exe
My Claude AI and general AI stuff.
TL;DR
- Claude is stateless = Every time you respond, the whole conversation is sent and re-read so your token usage gets exponentially more on every response.
- Use
/compactto reduce your conversation size/contextwill show your current conversation token usage.- Use CLAUDE.md to reduce token burn.
- Plan Mode is very useful
- **need to chase this** Jobs that don't need an immediate response can run at a 50% discounted token rate, useful for conversions.
- Pro or Enterprise plan is needed to use Claude in your IDE (i.e. Claude Code)
These will all apply to claude, but also other AI environments.
Enter and Shift+Enter key behaviour / Disable Enter sending message
claudeCode.initialPermissionMode
/context
/compact
/effort
/init
claude.md preventing Claude scanning your project every time or wasting tokens on figuring the same things out. You can also add rules in this file for Claude to follow./model
/status
/voice
Operational Settings
CLAUDE.md and MEMORY.mdMEMORY.md acts as an index of the memory directory.CLAUDE.md , I already have one but need to know if Claude can check if the content is still relevant and update it if needed?
CLAUDE.md file, but can help you review and update it!claude "Review my CLAUDE.md file and check if the content is still relevant and up to date"
/read CLAUDE.md then follow up with: Is this content still relevant? Suggest any updates.
claude "Read CLAUDE.md, check for outdated content, and update it in place with any improvements"
Please read CLAUDE.md and tell me if anything is outdated or missing Review it's suggestions, then ask Claude to apply the changes
permissions.deny setting in your .claude/settings.json file:
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)",
"Read(./config/credentials.json)",
"Read(./build)"
]
}
}
| Model | Description |
| Haiku 4.5 |
|
| Sonnet 5 |
|
| Opus 5.5 |
|
| Fable |
|
CLAUDE.md .claudeignore file to exclude large directories that Claude cannot meaningfully read./compact when context gets long.The /compact command summarizes your conversation and replaces the raw history with a compressed version — keeping essential decisions while trimming the noise.CLAUDE_CODE_MAX_OUTPUT_TOKENS## Open the shared chat in your browser https://claude.ai/share/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx ## Open the shared chat in your Claude Desktop App (untested) claude://claude.ai/share/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx
## Open the chat in your browser https://claude.ai/chat/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx ## Open the chat in your Claude Desktop App claude://claude.ai/chat/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx

Copy Link.claudeignore is not a native Claude Code feature.claude-ignoreGitHub - li-zhixin/claude-ignore A Claude Code PreToolUse hook that prevents Claude from reading files that match patterns in .claudeignore files, similar to how .gitignore works. - li-zhixin/claude-ignoreTerms and privacy stuff
I have made a PC that will go under me television for playing retro games and I choose Batocera for the OS
Batocera.linux is an open-source and completely free retro-gaming distribution that can be copied to a USB stick or an SD card with the aim of turning any computer or nano computer like Raspberry Pis and Odroids into a gaming console, for one game or permanently.
Batocera.linux does not require any modification on your computer. Note that you must own the games you play in order to comply with the law.
- If you are a Windows user
- Immediately after installing Batocera you should format your User Share to ExFat. This allows you to plug your Batocera drive into Windows and access it like a normal drive.
- See "Format the `userdata` Partition to ExtFat (allow Windows direct access)" for instructions
- Consider changing your root password from the default (user: root, pass: linux)
- If you do, write it down immediately and store safely.
TL;DR
- Flash Batocera to your drive (Etcher/ Pi Imager / USB Imager)
- Run Batocera
- Format the `userdata/share` partition to ExFAT
- Go through all of the settings of the GUI and set as needed
- Add your ROMs
SETTINGS --> GAME SETTINGS --> MISSING BIOS CHECK
- Download single games as you want, you don't need massive ROM packs with games you are never going to play on your drive.
- Extract the ROMs from their zip files (except for ROMsets, e.g. MAME)
- Puts ROMs directly into the folder with no sub folders (Flat Directory Structure)
exFAT, and copy the files directly to it. This is not recommended, as those filesystems have limitations.curl -L bit.ly/rgsx-install | bash
http://<my-batocera-ip>:5000
SETTINGS --> EXTRA DRIVE FILESYSTEM TYPES: EXFAT
SETTINGS --> FRONTEND DEVELOPER OPTIONS --> FORMAT DISK
DEVICE TO FORMAT: INTERNAL FILE SYSTEM: EXFAT
F1 and navigate to the userdata partition and verify there is a filesystem there.userdata partition.userdata partition.SYSTEM SETTINGS --> FRONTEND DEVELOPER OPTIONS --> ENABLE PUBLIC WEB API ACCESS: On
\\batocera or \\10.0.0.199
Username: root Password: linux
http://batocera:1234 or http://<your-batocera-ip>:1234
SETTINGS --> GAME SETTINGS --> UPDATE GAMELISTS
8.8.8.8 to see if you are on the internet. It does not affect functionality and is just an indicator.1920x1080@60Hz
You have imaged your USB drive successfully but Batocera will not boot.
Batocera supports these boot types:
- UEFI + Secure Boot (preferred)
- UEFI + No Secure Boot
- MBR/CSM/Legacy (Easiest)
No matter what setting I change (Fastboot, Disable Secure Boot, different USB adapters) my laptop can see my external Batocera drive (Samsung Evo), but does not see any bootable OS on it so I cannot select Batocera and boot it.

Batocera (sobetterExt 204) Batocera (sobetterExt 204) Batocera (sobetterExt 204)

Secure Boot Violation Invalid signature detected. Check Secure Boot Policy in Setup
If the non of the fixes above work you can
For Batocera v39 and higher: /EFI/batocera/bootx86.efi For Batocera v38 and lower: /EFI/BOOT/bootx86.efi
EFI/boot/bootx64.efi from the Batocera boot drive. This can be avoided entirely by switching secure boot off.
This article will include the capturing of non-digital media from Cassettes, Cassette Inlays, Disks, Disk Sleeves, Manuals, Newsletters, Packaging and anything else that is printed.
Preferred method for Inlay, Tape and Disk Scans
I have just tested NAPS2 and even though saving the scans as TIFF, my scanned images have JPG artifacts indicating they are saved in a lossy format.



These are just for reference at the minute as they are very in complete
I will cover how to debug languages (PHP, JavaScript) and CMS that I use with VSCode, Edge, Xampp, xDebug and other diagnostic tools as required.
These instructions might not be the most complex but they will explain the basics allowing you to get started without pulling your hair out. I find when you have a soft start you are able to pick the more complex concepts easier, and more crucially, on your own.
While I will concentrate on using Edge as my browser there will be a lot of cross over to Firefox and Google Chrome, especially between Edge and Chrome as they are both based on the Chromium browser.
F3 (or CTRL+ALT+F), a search menu will appear. You can then search or filter for a variable or it's value.\n as a new line where as the View method.settings.json
"debug.inlineValues": true
Debug: Inline Values, VS Code shows the runtime value of variables directly in the editor while debuggingThis might sound obvious, but there is always information in the browsers console.
Examine the console for errors, warnings and notifications.
You can use console.log() to output all sorts of information about variables, functions, classes and results into the console, although you might find using debugger easier for this. A console.log() can be used to output different messages depending on the result of a calculation or function and so on. For instance you would have a console.log() for success and one for failure.
### This will output the value `12345678` stored in the variable (`abc`) to the console
var abc = 12345678
console.log(abc);
### This will output the text `This is a message` to the console
console.log('This is a message');
### This will output `123` to the console
console.log(100 + 23);
### This will output the specified function (debounce) as text to the console. Useful to see if the function is defined
console.log(window.debounce);
Example Output:
ƒ debounce(func, timeout = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => { func.apply(this, args); }, timeout);
};
}
This is the traditional method of debugging using your browser and is usually JavaScript debugging as it is the browser (Client Side) that executes the code.
Notes
debugger from your code to pause on that line is equivalent to a line-of-code breakpoint, except that the breakpoint is set in your code, not in the DevTools UI.debugger;
$this variable, hover over it and it will show you all of the relevant variablesUsing this code as our example:
var chartDataDataset = _(timeScaleSegments).map(function(timeScaleRange, timeScaleIndex){ return countsPerTimeScaleIndex[timeScaleIndex] || 0; }).value();
In Edge DevTools, I can use debugger; to stop JavaScript and then examine the variables and objects. When I look at the chartDataDataset, DevTools shows Array(0) but DevTools knows that it has 3 arrays in it.
How do I use DevTools to Get a Live Reference so I can see these arrays in this object/array?
You're encountering a common behaviour in DevTools (including Edge and Chrome) where objects like arrays show as Array(0) at first glance — especially when the data is lazy-loaded or the object is logged in a way that doesn't immediately expand its contents.
So, when you pause in the debugger and hover or inspect an object such as chartDataDataset, DevTools might show:
Array(0)
This often happens when:
Here's several methods on how to see the full data, the live snapshot, which will show the "hidden arrays" in DevTools.
chartDataDataset is defined, add:
console.log(chartDataDataset);
debugger; statement after the line where chartDataDataset is defined:
var chartDataDataset = _(timeScaleSegments)
.map(function(timeScaleRange, timeScaleIndex){
return countsPerTimeScaleIndex[timeScaleIndex] || 0;
})
.value();
debugger;
chartDataDataset in the "Local" variables.It still says Array(0):
chartDataDataset and press Enter.This won't work well if it contains circular references, but it's useful for flat data.
console.log(JSON.stringify(chartDataDataset, null, 2));
While not fully "live", this lets you re-evaluate on demand as you continue stepping.
chartDataDataset to the Watch panel.You can select an object in the Elements or Scope tab and reference it in Console using:
$0 (currently selected object)$1, $2 for previous onesOr, just manually type chartDataDataset into the Console after it’s defined. That always evaluates it in real-time.
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
display_errors = on;
Below are the xDebug configurations I use.
launch.json"launch": {
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"xdebugSettings": {
"max_children": 128,
"max_data": -1,
"max_depth": 3
},
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003,
"runtimeExecutable": "D:\\websites\\php\\php.exe"
}
]
},
I have not used this, it is just for reference because I do not understand the additional options.
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"port": 9003,
"program": "",
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}",
"XDEBUG_TRIGGER": "VSCODE"
},
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
"pathMappings": {
"/srv/www/mywebsiteroot": "${workspaceRoot}",
"/app/": "${workspaceRoot}"
},
"stopOnEntry": true,
"log": true
}
zend_extension line for Xdebug below the line for OPCache, or in a file starting with a higher number (ie. 99-xdebug.ini vs 20-opcache.ini), otherwise they won't work properly together.zend_extension = xdebug
php.ini when you upgrade PHP etc...[XDebug v3]
; https://xdebug.org/
; https://xdebug.org/docs/all_functions
; https://xdebug.org/docs/all_settings
; https://xdebug.org/docs/upgrade_guide - (V2 -> V3) including replacements
; https://xdebug.org/docs/develop
; https://xdebug.org/docs/errors
;;;; Binary Location
; Download here: https://github.com/xdebug/xdebug/releases
; Xampp uses: 64-bit Thread Safe, for this version of PHP
; Example file explained : php_xdebug-3.5.1-8.2-ts-vs16-x86_64.dll
; 3.5.1 = xDebug Version
; 8.2 = Target PHP version
; ts = Thread Safe / nts = Not Thread Safe
; vs16 = Visual Studio version used to compile the DLL
; x86_64 = Supported Archietecture
; Thread Safe vs Non Thread Safe
; https://stackoverflow.com/questions/5793751/what-are-the-technical-differences-between-the-thread-safe-and-non-thread-safe-p
; If you're running Apache (or IIS) as FastCGI (or CGI) then you want the Non Thread Safe version of PHP.
; If you're running Apache as default (as a Module), then you'll want the more traditional Thread Safe version.
; Direct dll call
zend_extension = "D:\websites\php\ext\php_xdebug-3.5.1-8.2-ts-vs16-x86_64.dll"
; Alias call
; Download php_xdebug-3.5.1-8.2-ts-vs16-x86_64.dll
; Rename it to php_xdebug.dll
; Move the downloaded file to D:\websites\php\ext
; Use this call method below instead of the direct dll call.
;zend_extension = xdebug
;;;; Connection Settings
xdebug.mode = debug,develop
; https://xdebug.org/docs/all_settings#mode
; debug is needed for step debugging
; develop is needed to show orange `Call Stack`
; https://stackoverflow.com/questions/67274848/xdebug-3-not-showing-stack-trace-on-fatal-error-since-upgrading
xdebug.client_host = thebrain
; Can use an IP here but hostname is better
xdebug.client_port = 9003
; default port: 9003
xdebug.idekey = "vsc"
xdebug.file_link_format = "vscode://file/%f:%l"
; Clickable Stack Traces
; xdebug.file_link_format = "netbeans://open/?f=%f:%l"
; IDE Links stack traces and errors - https://xdebug.org/docs/all_settings#file_link_format - Read the Readme
;xdebug.start_with_request = yes
; The functionalit starts when the PHP request starts, and before any PHP code is run.
; I do not use this because i use a browser plugin
; https://buildio.dev/xdebug-and-its-impact-on-performance-xampp/
; It instructs XDebug to start a debugging session at the beginning of every PHP request.
; This means that XDebug will be active for all PHP executions, whether they are accessed through a web browser, CLI, or any other method that invokes PHP.
;xdebug.start_upon_error = yes
;Xdebug will trigger a debugging connection when a PHP Notice or Warning appears, or when a Throwable (Error or Exception) is thrown.
; This will be intiated by the browser, i think you have to have netbeans waiting in debug mode
;;;; Logging
; All warnings and errors also show up in the diagnostics log that you can view by calling xdebug_info().
; All data is appended
;xdebug.log = "D:\websites\tmp\xdebug\xdebug.log"
; https://xdebug.org/docs/all_settings#log_level
xdebug.log_level = 7
;controls how much information is logged.
;;;; Remote
;xdebug.remote_autostart = 0
; This must be off otherwise curl_exec() will crap out the debugger - dont know about V3
; ?? https://xdebug.org/docs/all_settings#start_with_request
;xdebug.remote_mode = req
;;;; General
;xdebug.collect_return = off
;xdebug.max_nesting_level = 100
; For Gantry - https://docs.gantry.org/gantry5/troubleshooting/max-nesting-level use 256
;xdebug.show_exception_trace = 1
; When this setting is set to 1, Xdebug will show a stack trace whenever an Error is raised - even if this Error is actually caught.
;xdebug.show_local_vars = 1
;This shows local variables in the stack trace
;https://xdebug.org/docs/develop
;xdebug.var_display_max_data = 16384
;;NOT in V3 - I Need to find the equivalent
;xdebug.auto_trace = off
;xdebug.collect_includes = on
;xdebug.collect_params = off
;xdebug.default_enable = on
;xdebug.extended_info = 1
;xdebug.manual_url = http://www.php.net
;xdebug.show_mem_delta = 0
;;;; Trace options
;xdebug.trace_options = 0
; When set to '1' the trace files will be appended to, instead of being overwritten in subsequent requests.
;xdebug.trace_format = 0
;xdebug.trace_options = 0
;xdebug.trace_output_name=crc32
; NOT in V3 - I Need to find the equivalent
;xdebug.trace_output_dir= "d:\websites\tmp\xdebug\trace"
;;;; Profiling - https://xdebug.org/docs/profiler
;xdebug.xdebug.profiler_append = 0
;xdebug.profiler_output_name = cachegrind.out.%p
; or "cachegrind.out.%t-%s"
; NOT in V3 - I Need to find the equivalent
;xdebug.profiler_aggregate = 0
;xdebug.profiler_enable = 0
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_enable_trigger_value = ""
;xdebug.profiler_output_dir = "D:\websites\tmp\xdebug\profiler"
;;;; Value Dumping
;https://xdebug.org/docs/all_settings#dump.*
;xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD
;xdebug.dump.GET = *
;xdebug.dump_undefined=1
PHP-FPM has a clear_env configuration setting that is on by default, which you will need to turn off if you want to use XDEBUG_CONFIG.XDEBUG_CONFIG environment variable to be passed on.output_buffering = Off in your php.ini or use ob_end_flush() in your code.error_log setting to syslog and PHP will send all error log messages to stderr, which Xdebug will then send to the IDE.error_log messages to the IDE, but there is now an xdebug_notify() function, with which you can send messages (strings, and variables) to the IDE as well.xdebug_notify() works, thank you! However, setting error_log to syslog in php.ini, restarting Apache, then issuing error_log("test"); in PHP (8.2) does not work for me.php_xdebug.dll 3.2.0.11.“max_children” value and enabling unlimited “max_data,” developers can obtain more comprehensive insights into complex data structures and object hierarchies during debugging sessions. Additionally, the limitation imposed on “max_depth” to a value of 3 prevents excessive recursion depths, striking a balance between thoroughness and performance.
"xdebugSettings": {
"max_children": 128,
"max_data": -1,
"max_depth": 3
}
512.launch.json "max_data": -1 into your xdebugSettings:
"xdebugSettings": {
"max_data": -1
},
xdebugSettings below the port declaration if it does not exist.-1 - it doesn't resolve the issue:
ini_get('xdebug.var_display_max_data')
"4096"
max_data in your launch,json. See the xdebugSettings section in the README.These all assume that Xdebug is setup correctly in php.ini
php -d xdebug.remote_enable=1 -d xdebug.remote_mode=req -d xdebug.remote_port=9000 -d xdebug.remote_host=127.0.0.1 -d xdebug.remote_connect_back=0 path/to/script.php
set XDEBUG_CONFIG=remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0
php -d xdebug.remote_enable=on -d xdebug.remote_autostart=0 -d xdebug.remote_handler=dbgp -d xdebug.remote_mode=req -d xdebug.remote_host="192.168.1.226" -d xdebug.remote_port=9001 -d xdebug.remote_connect_back=0 -d xdebug.remote_log="d:\websites\tmp\xdebug\xdebug_remote.log" -d xdebug.idekey="vsc" cron.php
set XDEBUG_CONFIG="idekey=vsc"
unset XDEBUG_CONFIG
set XDEBUG_CONFIG="idekey=vsc"These sections cover the main functionality of Xdebug.
There are many ways to trigger debugging:
cachegrind.out files generated by xdebug 2.var_dump() function; location, stack, and argument information upon Notices, Warnings and Exceptions; and numerous functions and settings to tweak PHP's behaviour.e6540 as this stops things work if you are on a DHCPe6540.lan and e6540.yourdomain.uk will work if configured but will involve an external DNS lookupTutorials
Notes
classic-doors.vm, you need to use a conditional breakpoint, not just a watch so to confirm, a breakpoint needs to be active which pause the execution.Static properties do not automatically appear in the Scope panel, you must add a Watch Expression to see the static variable such as:
$this::$variable \CMSApplication::$VAR Payment::$payment_details PaymentMethodCreditnote::$creditnote_details
This then shows the values of it underneath just like in the variables part.
Other options (not tried)
$this->paymentMethod = new $Payment; $chicken = new $Payment;
xdebug_info();print MyClass::$myStaticVarOtherClass::$theStaticHere are all practical methods depending on what you want:
$ref = new ReflectionClass(MyClass::class); $statics = $ref->getStaticProperties();
$statics in your debugger (it will appear as a normal array and expand cleanly).var_dump((new ReflectionClass(MyClass::class))->getStaticProperties());
(class_exists('MyClass') ? (new ReflectionClass('MyClass'))->getStaticProperties() : null)
(new ReflectionClass(MyClass::class))->getStaticProperties()
new ReflectionClass(MyClass::class)
Why Reflection works
This is just the same as viewing Static Variables but with the following format:
$this->app->components->payment->PaymentMethod - This shows all of the variables of the object $this->app->components->payment->PaymentMethod->$creditnote_details
I have not verified if this method works or if it is made up by AI
if the watch expression matched and execution paused, then VSCode should already be stopped at the line of code where the condition was met, or just before it, depending on when the expression was evaluated.
To find where in the code this happened, when execution has paused:
where
bt
Ctrl+Shift+Y (or View > Debug Console) to check the output.You simple add this function into your code and when it is called, it instanciates a breakpoint and causes the execution to pause.
xdebug_break() within your code to force a break.You simple create a breakpoint on your code using the GUI of VSCode and execution is paused at this point.
$payment_id == 90 $payment->id == 90 Payment::$payment_details['payment_id'] == 90 Payment::$payment_details['payment_id'] == true Payment::$payment_details['payment_id'] == false isset($payment['id']) && $payment['id'] == 90
$template === 'classic-doors'Or if unsure of the variable name, use:
strpos($template ?? '', 'classic-doors') !== false
true, Xdebug pauses, and VSCode opens the exact file/line where it matched.To get Xdebug in VSCode to pause (break) when any variable equals classic-doors, you can follow one of these approaches depending on your version of Xdebug and PHP:
$variable === 'classic-doors'
or
$pageTemplate === 'classic-garage-doors'
$someVariable === 'classic-doors'
if ($someVariable === 'classic-doors') {
xdebug_break(); // Forces a debug pause if Xdebug is connected
}
This is required for all methods.
xdebug.mode = trace xdebug.mode = develop,debug,trace
xdebug.output_dir="D:\websites\tmp\site.trace" xdebug.output_dir="D:\\websites\\tmp\\site.trace" xdebug.output_dir="D:/websites/tmp/site.trace" xdebug.output_dir="/tmp/site.trace"
D:\websites\tmp\site.trace.xt)\\ or single-quoted forward slashes / both work.xdebug.show_error_trace=1 xdebug.show_exception_trace=1
This method is the easiest and allow you to turn it on and off very quickly, however your will end up tracing the whole application.
Instructions
This method can be useful for tracing particular sections of code.
Instructions
xdebug_start_trace('/tmp/wp-trace');
/tmp/wp-trace.xt
include, require, include_once, etc.0.0001 104856 -> require_once(/var/www/html/wp-load.php) 0.0023 105321 -> require_once(/var/www/html/wp-config.php) 0.0032 106544 -> include_once(/var/www/html/wp-settings.php) 0.0045 107120 -> require_once(/var/www/html/wp-includes/load.php)
xdebug_start_trace(); - This will output a file to the folder defined by `xdebug.output_dir`
or
xdebug_start_trace('<location>'); - You can specify a location for the trace file. Accepts same formats as `xdebug.output_dir`
These inbuilt PHP functions allow you to Log Stack Traces.
var_dump(debug_backtrace());
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
Getting Xdebug, Xampp and Netbeans to work together in Windows can be a tricky thing and I want to address that here. These instructions will get debugging working all on the same PC and IP.
A symptom of a PC that is not setup correctly is this Netbeans Socket Exception error. You get this error when Netbeans cannot communicate with Xdebug and is usually because you are running them both on the same computer and therefore IP so the traffic routing is getting mixed up. It could also because something else is running on the debug port you have selected.

These settings are what I am using now and work well.
output_buffering = Off
[XDebug] zend_extension="D:\websites\php\ext\php_xdebug.dll" ;zend_extension="D:\websites\php\ext\php_xdebug-2.5.4-5.6-vc11.dll" xdebug.idekey = vsc xdebug.profiler_append = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_dir = "d:\websites\tmp\xdebug" xdebug.profiler_output_name = "cachegrind.out.%t-%s" xdebug.remote_enable = 1 xdebug.remote_autostart = 0 xdebug.remote_connect_back = 0 xdebug.remote_host = "192.168.1.160" xdebug.remote_port = 9001 xdebug.remote_handler = "dbgp" xdebug.remote_mode = req xdebug.remote_log = "d:\websites\tmp\xdebug\xdebug_remote.log" xdebug.show_local_vars = 9 xdebug.trace_output_dir = "d:\websites\tmp" ;xdebug.show_exception_trace = 1
Minimum working settings
These are the minimum settings I have found to work but are here only for reference.
[XDebug] ;zend_extension="D:\websites\php\ext\php_xdebug.dll" zend_extension="D:\websites\php\ext\php_xdebug-2.5.4-5.6-vc11.dll" xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=192.168.1.160 xdebug.remote_port=9001 xdebug.idekey=vsc
(Tools --> Options --> PHP --> Debugging)
You need to send a trigger to Xdebug via your browser to trigger the debugger. You can send the trgger via GET/POST but you need a plugin for this.
Now you have configured your system as above you need to test it before you can rely on it.
If xdebug does not work straight away then trying these things might help.
This code is taken from 21.4.2 How to Set Up XDebug | Oracle
<?php $address = '127.0.0.1'; $port = '9000'; $sock = socket_create(AF_INET, SOCK_STREAM, 0); socket_bind($sock, $address, $port) or die(); socket_listen($sock); $client = socket_accept($sock); echo "Connection established: $client"; socket_close($client); socket_close($sock); ?>
However I found this slightly better version from dbgtest.php · GitHub
<?php // adapted from https://blogs.oracle.com/netbeansphp/entry/howto_check_xdebug_installation $address = $argv[1] ?: '127.0.0.1'; $port = '9000'; $sock = socket_create(AF_INET, SOCK_STREAM, 0); socket_bind($sock, $address, $port) or die(); echo "Listening to $address:$port\n"; socket_listen($sock); $client = socket_accept($sock); echo "Connection established: $client\n"; socket_close($client); socket_close($sock);
Call to undefined function socket_create()
If there is something running on this socket you will get an error as shown below. This shows that some other process is using the port 9000.
Warning: socket_bind(): unable to bind address [10048]: Only one usage of each socket address (protocol/network address/port) is normally permitted. in D:\websites\htdocs\dbgtest.php on line 5
These are a few workarounds I tried and might work for you. These are not designed to be a permanent fix.
Method 1
* I am not sure if you need to do the IP fix aswell for this to work. It is all caused by routing issues on the loopback system of the PC. Or sockets might be needed.
Method 2
Method 3 - (if working and then stops for no reason)
TL;DR I am not a doctor. These are notes for myself that other people might find useful. Your health and body are your problem and if you have any health issues consult your doctor, not me.
I have had some general health issues which are probably due to bad diet and lifestyle. The advise I got from a Urinary Consultant was limited and in one particular case wrong, so I have decided to figure this out myself and write it up here for a reference.
TL;DR
- For a Man
- Reduce Visceral Fat
- Reduced Cortisol Levels
For 28 days.
this not complete and I might move it or remove this section. It should be a list of what I need to go and buy so I don't have to think about it.
| Time | Food | Fluids | Supplements | Exercise | Notes |
| 00:00 | |||||
| 01:00 | |||||
| 02:00 | |||||
| 03:00 | |||||
| 04:00 | |||||
| 05:00 | |||||
| 06:00 | |||||
| 07:00 | Breakfast Meal |
|
|
NB: Keep heart in fat burn zone |
|
| 08:00 | |||||
| 09:00 | |||||
| 10:00 | |||||
| 11:00 | |||||
| 12:00 | Meal Replacement / Protein Drink |
|
|||
| 13:00 | |||||
| 14:00 | |||||
| 15:00 | |||||
| 16:00 | |||||
| 17:00 | Normal Meal |
|
|||
| 18:00 | |||||
| 19:00 | Stop Eating | Stop Drinking |
|
|
|
| 20:00 | |||||
| 21:00 | |||||
| 22:00 | |||||
| 23.00 |
|
|
Diet Rules
For things that are not obvious in the table above.
These are just some a collection of ideas.
| Day | Time | Exercise | Notes |
| Monday | 11.00 - 12.30 | ||
| Tuesday | |||
| Wednesday | 11.00 - 12.30 | ||
| Thursday | |||
| Friday | 11.00 - 12.30 | ||
| Saturday | Walk | ||
| Sunday | Walk |
Recommend intakes of various stuff.
| Vitamin / Mineral | Nutrient Reference Intake (NRV) | Notes |
| Beta-Carotene |
|
|
| Biotin (Vitamin B7) |
|
|
| Calcium |
|
|
| Chromium |
|
|
| Copper |
|
|
| Folic Acid / Folate (Vitamin B9) |
|
|
| Glycine |
|
|
| Iodine |
|
|
| Iron |
|
|
| Magnesium |
|
|
| Manganese |
|
|
| Molybdenum |
|
|
| Niacin (Vitamin B3) |
|
|
| Omega 3 |
|
|
| Pantothenic Acid (Vitamin B5) |
|
|
| Phosphorus |
|
|
| Potassium |
|
|
| Riboflavin (Vitamin B2) |
|
|
| Selenium |
|
|
| Sodium Chloride (Table Salt) |
|
|
| Taurine |
|
|
|
Thiamin |
|
|
| Vitamin A |
|
|
| Vitamin B6 |
|
|
| Vitamin B12 |
|
|
| Vitamin C |
|
|
| Vitamin D |
|
|
| Vitamin E |
|
|
| Vitamin K1 |
|
|
| Zinc |
|
|
Vitamin Bottle values might be different to the NHS ones because:
These are not needed for a normal life but aid in improving it.
| Nutrient | Recommended Intake (RI) | Potential Benefits for | Notes |
| Ashwagandha (a.k.a Indian Ginseng) |
|
|
|
| Creatine Monohydrate |
|
|
|
| L-Theanine |
|
|
|
| Magnesium Glycinate |
|
|
|
| Melatonin |
|
|
|
| Modafinil |
|
|
|
The different types of food you should eat as part of a healthy diet
| Reference Intake of an average adult. | |
| Typical Values | Reference Intake (RI) |
| Energy | 8,400kJ / 2000kcal |
| Fat | 70g |
| of which saturates | 20g |
| Carbohydrates | 260g |
| of which sugars | 90g |
| Fibre | - |
| Protein | 50g |
| Salt | 6g |
mcg is preferred for medical information in the United States (US), but prescription writing guidance in the United Kingdom advises that "microgram" should not be abbreviated.g (Gram)
mg (Milligram)
μg / mcg (Microgram)
RI = Reference IntakeNRV = Nutrition Reference ValueBad diet and lifestyle can lead to these issues.
This is a temporary holding page for my QWcrm notes.
creditnote::checkRecordCanBeCreated()creditnote::checkRecordCanBeCreated()creditnote::checkRecordCanBeCreated()creditnote::checkRecordCanBeCreated(){if ($creditnote_details.status == 'unused' || $creditnote_details.status == 'partially_used') && $creditnote_details.client_id}{if $creditnote_details.status == 'unused' && $creditnote_details.invoice_id}{if $creditnote_details.status == 'unused' && $creditnote_details.expense_id}Creditnote::checkRecordCanBeCreated()
Payment::getCreditnoteActionTypes()
My Ventoy notes.
ventoy.json file with the following code:
{
"menu_style": "tree"
}
Current Issues
Instructions
Links
wimboot.img to wimboot.iso, use UltraISO to overwrite your boot.sdi and save the wimboot.iso file, then change wimboot.iso to wimboot.img bootmgr in ventoy_wimboot.img with bootmgr in standard windows11.iso and it's ok.ventoy.wimboot.img updated by me as I shared here https://drive.google.com/file/d/1izQc322ZsE5InRSJaZ5CXatUlDUizcWH/view?usp=sharingbootmgr in standard windows11.iso from Microsoft bootmgr must be capitalized as BOOTMGR Ventoy Warning - Partition1 (exfat) is Not ntfs, the VHD(X) file may not boot normally

Windows Boot Manager - Boot from VHD

Windows Boot Manager - winload.exe missing

Rebuilding the Windows Search Index, which includes the Outlook Search, can resolve various issues:
There are several ways and places to view the search index properties and its progress in rebuilding. After you have wiped your index it is useful to see how things are going.


- Instructions from here: How to Enable or Disable Indexer Backoff in Windows | Windows 10 Forums
Disabling the indexer backoff will allow indexing to finish faster while you're active on the computer instead, but it will use more system resources.
gpedit.mscOn (Default is Off)Off and restart the Windows Search service.
- This only applies if you have Microsoft Outlook the client installed on your PC
- Instructions from here: Outlook 2021 indexing not working - Microsoft Q&A
We need to ensure that Outlook is on the Windows Search Index
Outlook items are only indexed when Outlook is open
- I did not write this script
- Source: how to delete all exclude folders in search indexer and revert it to default? - Microsoft Q&A
- You can remove the bits from the script that you don't want to perform (Delete database | Reset Folder exclusions).
The following Powershell script fixes a lot of issue with the Windows search and is what I used.
# Stop Windows Search Service Stop-Service -Name WSearch # Delete the current search index database and configuration Remove-Item -Path "$env:ProgramData\Microsoft\Search\Data\Applications\Windows" -Recurse -Force Remove-Item -Path "$env:ProgramData\Microsoft\Search\Data\Temp" -Recurse -Force # Optional: Reset registry exclusions (set back to defaults) Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost" -Name "DefaultGatherPolicy" -ErrorAction SilentlyContinue Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost\Paths" -Recurse -Force -ErrorAction SilentlyContinue # Start Search Service Start-Service -Name WSearch
Notes
sc config wsearch start= disabled net stop wsearch REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb" /a del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.db" /a sc config wsearch start= delayed-auto net start wsearch :: reg query "HKLM\SOFTWARE\Microsoft\Windows Search\Gathering Manager" :: reg query "HKLM\SOFTWARE\Microsoft\Windows Search" reg query "HKLM\SOFTWARE\Microsoft\Windows Search\Gathering Manager" /v *path reg query "HKLM\SOFTWARE\Microsoft\Windows Search" /v *dir* reg query "HKLM\SYSTEM\CurrentControlSet\Services\WSearch" icacls %ProgramData%\Microsoft\Search\Data\ icacls %ProgramData%\Microsoft\Search\Data\Temp\ icacls %ProgramData%\Microsoft\Search\Data\Applications icacls %ProgramData%\Microsoft\Search\Data\Applications\Windows PAUSE PAUSE
msdt.exe -ep WindowsHelp id SearchDiagnosticmsdt.exe -ep WindowsHelp id SearchDiagnosticHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules\ and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex\Sites\LocalHost\Paths\