private String getOther(AbstractPdb pdb, RecordNumber r) {
		AbstractMsType type = pdb.getTypeRecord(r);
		StringBuilder builder = new StringBuilder();
		if (type instanceof PrimitiveMsType pt) {
			// Place to set break point during development
			int a = 1;
			a = a + 1;
		}
		if (type instanceof AbstractPointerMsType pt) {
			builder.append('p');
			AbstractMsType t = pdb.getTypeRecord(pt.getUnderlyingRecordNumber());
			if (t instanceof AbstractModifierMsType mt) {
				AbstractMsType modified = pdb.getTypeRecord(mt.getModifiedRecordNumber());
				String str = mt.toString();
				if (str.contains("const")) {
					builder.append("const");
				}
				if (str.contains("volatile")) {
					builder.append("volatile");
				}
				builder.append(modified.toString());
			}
			else {
				builder.append(t.toString());
			}
		}
		else {
			builder.append(type.toString());
		}
		return builder.toString();
	}
Developer script to capture items from Program and PDB for developing tests
Ghidra/Features/PDB/developer_scripts/CaptureHelperScript.java