Showing posts with label Configuration. Show all posts
Showing posts with label Configuration. Show all posts

Saturday, 23 April 2016

Debugging module installation on Drupal 7 with NetBeans

After following Configuring NetBeans, a very informative post on Drupal, I could still not debug my module on NetBeans 8.1. My main problem was that the breakpoints set on any of my module's files appeared as broken. In order to fix this, I needed to let NetBeans know which server request calls the module's code.

The Server request


Using Chrome's "Inspect" feature on the /admin/modules page after enabling my module and submitting the form, I found out that the module installation was being initiated by a POST request to "http://.../admin/modules/list/confirm".

I had created an apache virtual site to host it. On NetBeans, I included the whole Drupal 7 web tree as the project source (var/www/drupal7), and modified the project's Run Configuration accordingly (right click on the project's name > Properties):

NetBeans Project Properties - Run Configuration
Project Properties - Run Configuration
On the Advanced... settings window, I added the following Path Mapping:
  • Server Path: http://mylocalserver.local/admin/modules/list/confirm
  • Project Path: click on the ... and browse to the directory where your module is installed: /var/www/drupal7/sites/all/modules/my_module

Project Properties - Run - Advanced Web Configuration
Project Properties - Run Configuration - Advanced...


After this, the break points set on the files under .../my_module appeared and worked just fine.

Thursday, 22 January 2015

SQL Server Express 2014 for local connections

Amazingly, the default configuration for SQLServer Express does not enable local connections. To enable them:
  1. Open the Sql Server Configuration Manager. Available at All Programs > Microsoft SQL Server ... > Configuration Tools
  2. Under SQL Server Network Configuration > Protocols for SQLEXPRESS, enable Named Pipes and TCP/IP as needed.

Oh well.