Chatham and Sheerness were ordered to be carried out. He invented a movable chevaux de frise and a machine on wheels for defending a breach, an engraving of which is given in Grose's 'Military Antiquities.'
Debbieg proposed to raise a corps of military artificers at home on the model of the companies at Gibraltar, and developed the project in a letter to Lord Amherst dated 30 July 1779, but the proposal was not favourably received at the time, although eight years later it was adopted.
When Lord George Gordon decided, at the meeting of 29 May 1780, to march on 2 June with a 'no popery' mob to the House of Commons, Lord Amherst committed to Debbieg the task of placing the public buildings in London in a state of defence. Little time was available; but when, five days later, the riots commenced he had been able to take effectual measures for the protection of the Bank of England, the British Museum, and other public buildings and offices, as well as the New River head. On the 3rd, and again on 7 June, he assisted Colonel Twistleton in defending the Bank of England against the mob, who, finding the principal public buildings prepared for defence, wreaked their vengeance on Roman catholic chapels and the houses of public men who had supported the relief of Roman catholics. The riots ceased on 7 June as soon as the king ordered active military measures, but Debbieg continued to exercise his metropolitan responsibility until early in July, when trade and tranquillity were completely re-established. In the meantime he furnished the Bank of England with plans and estimates for making the buildings permanently, secure.
At the manœuvres of 1780 the king complimented Debbieg on the rapidity with which he threw three bridges across the Thames below Gravesend, by which the whole army was quickly transferred from Essex to Kent. In October Debbieg submitted to Lord Sandwich a proposal to close Gillingham Creek, and to improve the navigation of the Medway at Chatham. The idea was in advance of the time, but was carried out eighty years later. He also proposed, in January 1781, a new pontoon equipment, which was adopted by the board of ordnance and continued in use for many years.
On 24 Jan. 1781 Debbieg was promoted to be sub-director and major in the royal engineers, and on 20 Nov. 1782 to be colonel. It was about this time that he selected for his clerk William Cobbett [q. v.], then a recruit in one of the depot battalions at Chatham.
On the third duke of Richmond becoming master-general of the ordnance in March 1782, Debbieg, who had had some passages of arms with him on the subject of defence, and had been attacked by him in the House of Lords in the previous November, found, or fancied he found, his position slighted and his official representations ignored; and when the duke obtained a royal warrant for the reduction and reorganisation of the royal engineers in 1784, by which the emoluments of the colonels were very largely reduced, Debbieg's hot temper and outspokenness got the better of his judgment, and he wrote a private letter to the duke, couched in such strong terms that he was tried by a general court-martial, and sentenced to be reprimanded. In the following year the House of Commons nominated Debbieg to be a member of the board of land and sea officers to report on the defences of the kingdom, but the duke refused to allow him to serve, and for some years he was unemployed. Having worked out and submitted a scheme of considerable merit and breadth of view for the defence of the kingdom, of which no notice whatever was taken, he wrote another intemperate letter to the duke, dated 16 March 1789, and published it in the 'Gazetteer.' He was again tried by a general court-martial, and sentenced to be deprived of rank and pay for six months. This incident is referred to in the 'Rolliad' in the lines beginning
Learn, thoughtless Debbieg, now no more a youth,
The woes unnumbered that encompass truth.
His conduct does not seem to have been considered very serious, for he was received at court before his six months' suspension had expired, and was promoted to be major-general on 12 Oct. 1793, and lieutenant-general on 1 Jan. 1798. Much to his indignation he was posted to the invalid engineers on 31 Aug. 1799. On 15 March 1800 the king granted him a special additional pension in consideration of his services, and he was promoted to be general on 25 Sept. 1803.
Debbieg died at his residence in Margaret Street, Cavendish Square, London, on 27 May 1810, leaving two sons in the army Clement (d. 18 April 1819), in the 57th foot, and Henry, in the 44th foot, who became a lieutenant-colonel and fort major of Dartmouth castle. His wife died in March 1801.