In WordPress, if you save data in array format in post meta table or options table, data stored in serialize format and when fetched, it returns data in array format. So, WordPress functions perform data serializing and unserializing.
During development or testing or debugging and if data stored in serialize format, then I used to use online website or run PHP code to unserialize data. I’m using VSCode for development so, I thought that developing extension for VSCode would be helpful.
I didn’t know how to develop extension. I went through VSCode Extension API documentation for learning. Their Hello World Sample extension is helpful for getting started. I have used Yeoman and VS Code Extension Generator for extension scaffold.
After learning and exploration and some trials & errors, I able to develop extension, allows developers to unserialize data.
GitHub Repo: https://github.com/chandrapatel/vscode-php-unserialize
This extension is not released on VSCode Marketplace. I have mentioned steps for manual installation in repo’s readme file.
Leave a Reply